02-25-2013 12:56 PM
Hi people, we are having some issues registering our device so we can get push notifications.
Here's our scenario:
-We have a Blackberry 10 Dev Alpha device with OS version: 10.0.9.388
-Already registered to the push service
-Created android.cfg and changed values with the ones received from Blackberry :
<appid>appid received from blackberry after registration to push service</appid>
-Added manifest permissions.
-We deploy the app using a Debug Token.
-Device is connected to Blackberry network (we can add contacts, chat through BBM, etc.)
-Structure of the generated .bar file seem to be ok. (.apk, manifest -permissions are ok too-, android.cfg)
GCM is working fine on Android devices, but, when we debug it on BlackBerry dev alpha device, register method from GCMRegistrar class is not registering our device and getRegistrationId method is always returning an empty string.
There is no exception being thrown, so we don't know what is failing in the register method.
Is there a way to see some logs? We tried to connect to the device through SSH but we don't know where to find some logs about this (if there are any) .
We have gone through all of what is discussed in this topic but still can't get it working.
Thanks in advance.
Solved! Go to Solution.
02-25-2013 03:57 PM
From what i've got from stackoverflow, Blackberry does no magic with our GCM implementation, and we must code a specific blackberry module to register our device.
If this is true, should we use the blackberry java sdk or is there another way?
02-25-2013 07:07 PM
I have followed the same steps and run into the exact same issue. All information I've found regarding registering a BB10 device for notifications is for apps using WebWorks, Cascades, AIR, etc. We are porting out apps from Android and using the Android SDK and Java JDK 7. Is there a PushService jar available to handle this process?
It seems the only issue is finding a way to get the BlackBerry device PIN (notification token) through the normal JDK. Assuming the client side android.cfg is all we need in place to listen for and receive notifications. I have no yet verified this part.
02-25-2013 08:59 PM
02-26-2013 08:10 AM
After updating OS version from 10.0.9.388 to 10.0.10.263, our GCM implementation started working (advice by people from Blackberry Support team).
We got the registration id after calling GCMRegistrar.register and now we are getting notifications!
So there is no need to use Blackberry SDK or any other third party library.
If you are porting your android app to blackberry, make sure your android.cfg is well formed and with valid data received from Blackberry mail after registration for push services.
Also check if push notification permission are in the manifest file in your repackaged .bar file.
Nothing else has to be done, no extra coding was needed in our case!
Hope it helps.
02-26-2013 12:30 PM
That is excellent news, thanks. I'm updating now.
However, does this mean that if we release our app now that push notifications will not work since nobody out there is on 10.0.10 yet?
Also, is there an equivalent update for the PlayBook or is this dev alpha build only for BB10 devices like the Z10?
02-26-2013 12:39 PM
Do you know with which OS version are the Z10 coming out?
Since we received this dev alpha prototype device like 3 months ago, we thought that maybe we have an old beta os version, and that z10 devices would come out with the newest version available installed.
Don't know about PlayBook, but there is a 188.8.131.526 os version available...
02-26-2013 12:52 PM
Well our version was older than that. The os that our device had wasn't even completed (ie: it didn't have sms app installed).
Let me know if after update, notifications started working for you.