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

New Contributor
Posts: 6
Registered: ‎03-19-2013
My Device: Blackberry Z10
My Carrier: Rogers

GCM on Android Runtime App - Please help

I looked at the following: https://developer.blackberry.com/android/apisupport/creating_push-enabled_android_apps.html


I modified my app and added the android.cfg file and all,,, 

My app sends the Device PIN and its stored in my sql database...


everything is fine so far.


Now, I want to send a push notification to the registered device (I looked online for various solutions and explanation how how to get it going) no luck so far.


Please can you help answer some of the questions I have: (please keep in mind that this s very new to me and I am trying to understand how everything works)


- When we send a push notification, we do not rely on GCM anymore, we are dealing with Blackberry notification service?


- second, How can this be accomplished using PHP,,, I found a script online (https://gist.github.com/siriusdely/2572588#file-push_ppg-php) it just give me error message (Invalid document end)? is there a possiblity to be able to send push notifications using PHP? can you recomment a tutorial or such?


Thanks again for your help -  I am very aware that there are various forum topics discussing this issue but all of them are old and no final solution has been presented.


Thanks again for your help.


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

Re: GCM on Android Runtime App - Please help

1. Yes it totally relies on Blackberry notification service and it does not talks to GCM at all.

2.  Not sure about php, but I initially tested with a SOAPUI tool to post the push notification to the blackberry server and it worked and then we ported it to java code.


You can use a XML post tool like soapui etc and use the following format to test it out:

URL: https://cpXXX.pushapi.eval.blackberry.com/mss/PD_pushRequest 

replace XXXX with CPID as per BB registration email



Authorization: Basic <based on document>

Content-Type: multipart/related; type=\"application/xml\"; boundary=<boundary>




Content-Type: application/xml; charset=UTF-8

<?xml version="1.0"?>

<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 1.0//EN" "http://www.openmobilealliance.org/tech/DTD/pap_1.0.dtd">


<push-message push-id="pushID:999999999" 

                source-reference="XXXX-xxxxxxxxxxxxxxxxxxxxxxxx" <!-- your appid as per BB registration email>


                <address address-value=<device pin>/>

<quality-of-service delivery-method="unconfirmed"/> <!-- or "confirmed" >