Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android C2DM Registration_ID max size

What is the maximum possible size of the registration_id field used for Android C2DM service?

like image 964
floater Avatar asked Oct 06 '10 00:10

floater


2 Answers

The max size for a registration_id is bounded by the max size for a cookie, which is 4K (4096 bytes).

In practice, the tokens are going to be much smaller than that, but you shouldn't rely on this behavior going forward.

(The registration_id is not considered part of the payload, so the footnote Reno mentioned doesn't apply here.)

Source: I'm on the Android team at Google. :)
(I'll be updating the docs soon to make this more clear, since there's been a few people asking recently.)

like image 180
Trevor Johns Avatar answered Oct 06 '22 11:10

Trevor Johns


According to This thread results vary (98 and 120 are given), but the poster recommends setting aside 255 in your database, and that's what I'm going with.

like image 28
SatNav Avatar answered Oct 06 '22 13:10

SatNav