Search code examples
androidblackberry-10blackberry-androidblackberry-push

Keep getting TOO_MANY_REGISTRATIONS from blackberry push registration


I am trying to port an android project to a BB10 app. I have followed the instructions to implement BB Push as closely as I can. I have successfully registered one of our apps on push, but when I try and register another the server returns with "TOO_MANY_REGISTRATIONS" on the GCM intent. Any help appreciated.

Project 1 - android.cfg (values changed for security and to illustrate point)

<android>  
   <push>
      <appid>XXX1-XXXXXXXXXXXXXXXXXXXXXX</appid> 
      <ppgurl>https://cpXXX1.pushapi.na.blackberry.com</ppgurl> 
      <tokenprefix></tokenprefix>
   </push>
</android>

Project 2 - android.cfg

<android>  
   <push>
      <appid>XXX2-XXXXXXXXXXXXXXXXXXXXXX</appid> 
      <ppgurl>https://cpXXX2.pushapi.na.blackberry.com</ppgurl> 
      <tokenprefix></tokenprefix>
   </push>
</android>

EDIT: I tested both the apps on same phone (Z10), so as I understand it, it would've generated same device token?


Solution

  • I eventually solved the issue. I had to security wipe the phone. This isn't necessarily needed though. I did not understand that on BB10 you need to delete the app to clear cache. So it may have been possible just to delete app and reinstall.

    After reinstalling my apps from a fresh OS, it works perfectly. Also good to note:

    <ppgurl>http://cpXXX2.pushapi.na.blackberry.com</ppgurl> 
    

    http not https, otherwise you get INVALID_SENDER