0

How long should my push notification key length be in the database assuming I use a VARCHAR and want to pre-determine its length?

This is referring to the new push notification and not the old server where the id was numeric:

https://www.codenameone.com/blog/new-push-servers.html

Shai Almog
  • 51,749
  • 5
  • 35
  • 65

1 Answers1

0

This is problematic since the Codename One push notification key is effectively structured as cn1-gcm-nativekey, cn1-ios-nativekey etc...

The variable here is the nativekey, on iOS its length is fixed to 32 but in Android it can theoretically reach 4K.

Realistically Android push keys are currently well below 200 chars but they might grow in length and you should add the 8 chars in length that Codename One needs so too be 100% secure for the future you would need 4104 characters but you can probably get away with 250 and be really safe with 500.

Community
  • 1
  • 1
Shai Almog
  • 51,749
  • 5
  • 35
  • 65