What's the length of registration ID

3,277 views
Skip to first unread message

yu

unread,
Feb 25, 2011, 6:13:21 AM2/25/11
to android-c2dm
Hi all,

Based on my test, the length of registration ID is 98. However, I
cannot find any document about this. Is there someone knowing this?
Thanks in advance.

chrisbratlien

unread,
Feb 25, 2011, 5:08:31 PM2/25/11
to android-c2dm
For me, the length is 120. I'm planning on using a varchar(255) to
store this value in my database.

Trevor Johns

unread,
Oct 18, 2011, 9:01:34 PM10/18/11
to androi...@googlegroups.com
Yu, Chris,
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.

-- 
Trevor Johns
Developer Programs Engineer, Android

Christopher Bratlien

unread,
Oct 19, 2011, 1:49:47 AM10/19/11
to androi...@googlegroups.com, androi...@googlegroups.com
Trevor,

Thanks for the clarification. We will adjust accordingly.

Cheers,
Chris

c2dm user

unread,
Jun 7, 2012, 6:50:18 PM6/7/12
to androi...@googlegroups.com
So when storing the registration id into database. 
Do you recommend a varchar(4096) ?

selmi amel

unread,
Jun 8, 2012, 5:49:16 AM6/8/12
to androi...@googlegroups.com
Salem
I work with varchar(250).

2012/6/8 c2dm user <chandrasheka...@gmail.com>



--

Selmi Amel
Project Manager of Python @ 
Tunis-GTUG
Member of Tunandroid.com

Android and BlackBerry developer

E-mail: amel....@gmail.com ;amou...@apps-network.com

           



lorrin ferdinand

unread,
Feb 26, 2013, 7:05:06 PM2/26/13
to androi...@googlegroups.com
I saw elsewhere (stack overflow?) where u indicated that documentation would be updated - where is this documentation if you could send a link that would be great!
thx
Reply all
Reply to author
Forward
0 new messages