Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Runtime Development

Reply
New Contributor
excelzero
Posts: 4
Registered: ‎01-04-2013
My Device: Bold 9900
Accepted Solution

Push not working after device reboot?

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!

 

Except....

 

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.

Please use plain text.
New Contributor
excelzero
Posts: 4
Registered: ‎01-04-2013
My Device: Bold 9900

Re: Push not working after device reboot?

[ Edited ]

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:required minimal Tablet OS version=10.0.9:impact=2.

 

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?

Please use plain text.
Contributor
gumpyboy
Posts: 42
Registered: ‎09-25-2010
My Device: Not Specified

Re: Push not working after device reboot?

This is also happening to me. Is there someone come up with solution?
Please use plain text.
New Developer
ennova2005
Posts: 96
Registered: ‎07-26-2008
My Device: Not Specified

Re: Push not working after device reboot?

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.

Please use plain text.
Contributor
gumpyboy
Posts: 42
Registered: ‎09-25-2010
My Device: Not Specified

Re: Push not working after device reboot?

but after rebooting, we cannot register for push without user opening the app first, there is no autorun for this.
Please use plain text.
BlackBerry Development Advisor
mwhiteman
Posts: 159
Registered: ‎11-21-2008
My Device: BlackBerry 10
My Carrier: Rogers

Re: Push not working after device reboot?

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.

 

Thanks,

 

 

 

Matt Whiteman
Product Manager, Android, BlackBerry Java & Simulators
Please use plain text.
New Contributor
excelzero
Posts: 4
Registered: ‎01-04-2013
My Device: Bold 9900

Re: Push not working after device reboot?

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.

Please use plain text.