I need to save my users iOS and Android device token into a mySql DB so that I can send out push notifications.
My question now is what length is the device token for iOS and Android, is a column varchar(64) enough for a token?
I need to save my users iOS and Android device token into a mySql DB so that I can send out push notifications.
My question now is what length is the device token for iOS and Android, is a column varchar(64) enough for a token?
The Android device token is way longer than iOS device token.
I got 152 characters in the Android. While 64 total in iOS
As others have mentioned, I wouldn't rely on the length of the token to differentiate the two. Just a quick look in a large database showed me that there are iOS and Android devices that can have tokens of 152 or 174 characters.
You will want to rely on something else to differentiate them.
iOS Device Token length is 64 and android device token length will be 152.
It looks like it evolved to 174 for Android today. Most likely it will change in the future again