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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
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.

 

Highlighted
Contributor
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

 

Headers:

Authorization: Basic <based on document>

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

 

Request:

--<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">

<pap>

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

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

        deliver-before-timestamp="2020-12-31T23:59:59Z">

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

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

</push-message>

</pap>

--asdlfkjiurwghaslkfjsadkfaksdjff

 

{

     "key":"value",

      "key2":"value2"

}

--asdlfkjiurwghaslkfjsadkfaksdjff--