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.
08-17-2012 06:14 AM
Ok, I managed to get the push messages on the app! The alert triggered after a reinstall
But I can't seem to get the notifications while the app is open. Is it possible to show the notification on the device desktop, like the other native apps?
08-17-2012 10:15 AM
That good news that you've been able to make progress.
I see in the sample code you posted beofre that you are specifying index.html as your wakeUpPage. So when a push comes in and your application is closed the following page will be loaded.
var wakeUpPage = "index.html";
Can you confirm that the body onload in your index.html calls the blackberry.push.openBISPushListener() function?
Also from the Push API reference it says you must specify the rim:allowInvokeParams="true" in your config.xml
<content src="index.html" rim:allowInvokeParams="true" />
You may also want to add the following feature to your config.xml
<feature id="blackberry.invoke" required="true" version="22.214.171.124"/>
08-17-2012 11:42 AM
Ok, so I did confirm the blackberry.push.openBISPushListener() is called on the body load of index.html and added those configurations to the config.xml file (i was missing the feature blackberry.invoke).
When I have the application open, the notifications arrive perfectly, but when I close the app or when I switch to another task (using the BB key) the notifications cease.
Do you know if this is possible to do? I mean, how does the push notification know where the index.html page is if the app is closed?
08-17-2012 02:16 PM
08-17-2012 03:28 PM
Ok, understood, thanks
My app only has the index.html page, I'm using jquery mobile to change the display, so my only page has the body onload calling the openBISPushListener... what else can I check?
08-23-2012 06:37 AM - edited 08-23-2012 06:40 AM
I have been having the exact same issue and fixed it by moving openBISPushListener out of the onload event as follows: