02-26-2013 02:26 PM
I have ported my app from Android to the BlackBerry Android 2.3.3 Runtime. The only problem with the port is that Google Cloud Messaging service is not compatible. I have started implemting a BlackBerry push solution but there is not much info regarding apps ported from Android to BB10.
My question is how do I get the device PIN from the Android or Java SDK to register my BB10 device for push?
I am testing on a Z10 with OS 10.0.9.2372. I've heard upgrading to the dev alpha build will make GCM (GCMRegistrar.register) compatible. But even if I did upgrade to 10.0.10 dev alpha build and got notifications working, when we release the app, the device registration wouldn't work for PlayBook or any users on Z10 who have the factory OS install.
Is there any known solution to get notifications working on BB10 apps ported from Android... or are we forced to release the app without notifications?
02-26-2013 03:10 PM
02-26-2013 03:15 PM
GCM should be able to successfully work for you.
Here is a document outlining what you need to do to get push notifications to work with your Android ported app:
02-26-2013 03:22 PM
I should have mentioned that I have already followed all of those steps. I've registered for push eval, the app is ported to Android Runtime and works perfectly.
However, my client side GCM service says it can't obtain a registration id (push token) because the GCM service is unavailable. This is on the Z10 with OS 10.0.9.2372
02-26-2013 03:29 PM
02-26-2013 07:17 PM
Creating a new debug token seemed to work. I also found this site that explains how to debug with adb and see the logcat output of the ported BB10 bar running on my Z10.
It looks like the registration went through to the PPG properly. However, I'm seeing some errors relating to the BroadcastReceiver now:
02-26 16:05:44.803: D/ShrimpController(13197523): onMessageReceived() @shrimp
02-26 16:05:44.803: D/ShrimpController(13197523): msg::registerComplete
02-26 16:05:44.803: D/ShrimpController(13197523): packageName::xxx
02-26 16:05:44.803: D/ShrimpController(13197523): errno:n:10110
02-26 16:05:44.803: D/ShrimpController(13197523): errstring::
02-26 16:05:44.803: D/ShrimpController(13197523): registerComplete
02-26 16:05:44.803: D/QNXShrimpClient(13197523): onRegister()
02-26 16:05:44.804: E/QNXShrimpClient(13197523): com.google.android.c2dm.intent.REGISTER error(10110) = ""
02-26 16:05:44.808: V/GCMBroadcastReceiver(15651023): onReceive: com.google.android.c2dm.intent.REGISTRATION
02-26 16:05:44.808: V/GCMBroadcastReceiver(15651023): GCM IntentService class: xxx.GCMIntentService
02-26 16:05:44.808: V/GCMBaseIntentService(15651023): Acquiring wakelock
02-26 16:05:44.819: E/BroadcastReceiver(15651023): BroadcastReceiver trying to return result during a non-ordered broadcast
02-26 16:05:44.819: E/BroadcastReceiver(15651023): java.lang.RuntimeException: BroadcastReceiver trying to return result during a non-ordered broadcast
I will attempt pushing some notifications to the device from our server now that it has been registered.
02-27-2013 06:56 AM - edited 02-27-2013 06:57 AM
Hey spasms, i have the same exceptions but it seems that in background it keeps retrying 'till the registration is done.
If you have a OnRegistered method or something like that, put a break point there and you will see that, although that exception is being thrown, the registration will be succesfull.
02-27-2013 09:43 AM
It looks like from your logs you're getting a 10110 error code back which means PPG_SERVER_ERROR.
It typically means something is wrong with your PPG URL.
This means the registration would not have been successful for you.
03-18-2013 10:21 AM - edited 03-18-2013 10:22 AM
Does anyone work with GCM?? I also have same problem.. Please give me any clues... Did you find the way to get push pin using Android API?
03-18-2013 12:33 PM
You have to make sure you first register to use the BlackBerry Push Service here:
And then, make sure that when you send pushes to BlackBerries, you send them to the BlackBerry PPG servers instead of the Google ones.