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™ Development

Posts: 10
Registered: ‎03-15-2013
My Device: BlackBerry 10 Dev Alpha B
My Carrier: T-Mobile

Urban Airship push notification for Android runtime.

I have been working to port our Android app to BlackBerry Android runtime. Everything is working fine except push notification. If possible, could I ask some questions about it??
When I investigated about it, I found three answers about implementing the push notification on Android runtime.
First one is using our current server system without any changes.
We are using Urban Airship with Android GCM for BlackBerry push notification now. I have registered to BlackBerry Push Service Evaluation and got the appid, password and ppgurl, after then set it to android.cfg. Now I get the APID:6f61531f-0069-47c1-a638-97f0551d823f by Intent { act=com.urbanairship.push.REGISTRATION_FINISHED cmp=com.xxx.xxx/.c2dm.UrbanAirshipReceiver (has extras) } on Eclipse Logcat. However when we send Android Test Push, we have not got anything, nothing happens.
Could we use Urban Airship Android push notification service without changing our server?
Second one is using BlackBerry Application Servers.
At this time, our server sends the push data to Urban Airship and UA send it to Google GCM server. But to use BlackBerry Application Servers, our server needs to send it to BB server directly, but I could not find the way to get push pin using Android API on device side. I can see the method for CPP, but not for Android. If we could not get it, server can not distinguish devices.
How to get the push pin using Android API??
Third one is that on Android runtime, push notification does not work.
Some people answered that it is not possible to send the push notification to Android runtime app, because BlackBerry does not provide the functionality.
Is it true??
Sorry for long long questions, but there are not many documents and Q&As, and really thanks in advance.

Posts: 18
Registered: ‎03-14-2013
My Device: Z10
My Carrier: NA

Re: Urban Airship push notification for Android runtime.

I got the push working on android runtime via BlackBerry server for an existing android apk.

I guess the push notification on Android runtime can only work via BlackBerry push service and will not work if you send it to GCM server as there is no Google play or Google connection from device to work.


1. You need to change the server side push to BlackBerry push via http://docs.blackberry.com/en/developers/deliverables/25167/Overview_1259222_11.jsp


2. If UrbanAirship supports BlackBerry push, then you can use that to send android json payload via UrbanAirship BB push.


3. By the steps on https://developer.blackberry.com/android/apisupport/creating_push-enabled_android_apps.html you can make an exitsing android apk (which works with GCM and subscribe the GCM registration id with your server) to subscribe device pin to your server instead of GCM registration id.  I have this working without app code change as per this document.


also refer for some trouble shooting tips: http://supportforums.blackberry.com/t5/Android-Runtime-Development/Not-receiving-push-notification-o...