01-23-2013 04:44 PM
So we have successfully implemented BlackBerry push with our Android ported app. The app registers with RIM and receives a success response. We successfully register the return info to our application server. Our application server sends push messages to the device, they are accepted by RIM servers and are received on the device successfully. All is great!
If we power down the device or restart the device when it comes back it no longer receives pushes for the application unless we re-register with RIM BPAS. They are sent to the device and accepted the same as before they just never get received on the device.
What are we doing wrong? Is it expected that in order to receive pushes after a device reboot the user has to launch our app in order to register back with push? That would be really weird because a user won't necessarily launch the app after every reboot.
Solved! Go to Solution.
01-24-2013 02:51 PM - edited 01-24-2013 02:52 PM
Today I thoguht that perhaps the problem had to do with how the app was built and signed. So I tried to do as close to production release as possible to see if it helped.
I exported a signed APK, signed with our company keys. I then used all of the manual command line tools, apk2barVerifier ran ok with only minor warning: uses-permission: com.google.android.c2dm.permission.RECEIVE:require
Which should be ok since we are testing on a Dev Alpha A with OS version 10.0.9.2320
I ran apk2bar which succeeded. I made sure to add my android.cfg into the bar and made sure the Entry-Point-System-Actions: _sys_use_consumer_push entry was in the manifest.
I ran batchbar-signer and signed the bar file with my author and company keys successfully. Then deployed it to the device using batchbar-deploy which was also successful.
I ran the app and the same behaviour was noted. When I run the app after install it registers for push and successfully receives pushes when the app is closed.
I reboot the device. I even make sure I put the device back into development mode after it finishes rebooting, then I launch the app and close it. It no longer receives pushes.
Is this expected behaviour? Will it only work through reboots with a BlackBerry World install?
01-30-2013 02:29 AM
Issues like this used to plague earlier versions of the BB OS as well. As a failsafe, we always re-register the application on reboot. Another area that also bit us was that notification preferences registered with the device need to be redone on reboot - so if you are using a combination of push + notification via preferences, it could be that the latter is not working after reboot.
01-31-2013 09:14 AM
Thanks for bringing this to our attention. We have the Android Runtime dev team looking into this.
As ennova2005 said, you will have to unregistor/re-registor after a reboot as a work around. Also, becuase applications do not autostart, the applicaiton will have to be opened/started by the user.
03-01-2013 11:22 AM
Just as an update I've tested with OS 10.0.10.85 (10.0.10.672) for the Z10 and this issue appears to be fixed. I can reboot the device and after the reboot pushes successfully are received by our Android app without having to launch the app and unregister/re-register with push.