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="18.104.22.168"/>
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: