01-31-2013 07:23 AM
We're trying to implement a PHP communication layer to connect to BlackBerry BIS PUSH service. So far, everything worked fine, except for when we try to send a notification request, it never makes it to the actual phone.
Registration and unregistration of the device works correctly, we can even query the server for registered devices and see it there.
This is what we're sending:
--djkahsjkdhashdkajhdsj Content-Type: application/xml <?xml version="1.0"?> <!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.1//EN" "http://www.openmobilealliance.org/tech/DTD/pap_2.1.dtd"> <pap> <push-message push-id="XXXXXXXXXXXXX" deliver-before-timestamp="2013-01-31T11:40:26Z" source-reference="XXXX-XXXXXXXXXXXXXXXXXXXXXXXXX"> <address address-value="XXXXXXX(device id)"/> <quality-of-service delivery-method="unconfirmed"/> </push-message> </pap> --djkahsjkdhashdkajhdsj Content-Encoding: binary Content-Type: text/plain Our Message Text Here --djkahsjkdhashdkajhdsj--
And this is what we get back:
<?xml version="1.0"?> <!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.1//EN" "http://www.openmobilealliance.org/tech/DTD/pap_2.1.dtd"> <pap> <push-response push-id="XXXXXXXXXXX" sender-address="http://XXXX.pushapi.eval.blackberry.com/mss/PD_pus hRequest" sender-name="RIM Push-Data Service" reply-time="2013-01-31T11:35:27Z"> <response-result code="1001" desc="The request has been accepted for processing."></response-result> </push-response> </pap>
Some additional details:
Any ideas?
01-31-2013 09:26 AM
Hi,
The push-enabled application you have running on the device. Is it a sample one or one you've written? Also, is it written in Java or WebWorks? Perhaps it's missing something in its handling of the incoming push?
Matt
01-31-2013 09:34 AM
Hi Matt and thank you for your response!
The application is a PhoneGap WebWorks application - i.e. simple JavaScript, HTML and CSS files put together and displayed. The JavaScript part calls blackberry.push.openBISPushListener(), which in turn registers applicaton for BIS PUSH messages. This part all works correctly, as we can queue the BB PUSH server and see that the application really IS registered with its valid PIN.
The problem is there is no message delivered to the phone itself.
If we had problems with the actual handling, shouldn't we at least see the application icon and the notification itself in the top status bar?
Martin
01-31-2013 10:21 AM
Hi Martin,
So, your onData function doesn't get called at all? If you put an alert at the top of the onData function, it doesn't show up when the push comes in?
Thanks,
Matt
02-01-2013 02:37 AM
Hi Matt,
that's correct, the onData function never gets called. Furthermore, we don't even see any notification delivered on the phone - there should be application icon, text and sound when it arrives at the top status area, but it's not.
Martin
02-01-2013 08:18 AM
Hi Martin,
Could you please send a confirmed push.
So, in your PAP XML, you would have a quality of service that says "confirmed":
<quality-of-service delivery-method="confirmed"/>
And, make note of the time you sent it (in GMT) and the push ID that it was sent with. Then, private message me with that information and your app ID and I will look to see what the final status of the push is.
Thanks,
Matt
02-01-2013 09:48 AM
Hi Martin,
I just looked up the confirmed push you sent (and told me about in a private message).
Your push is getting a 4500 error code: The request failed because the message expired before it could be delivered.
The push is expiring before it can be sent to the device so you need to update what you're setting for your deliver-before-timestamp on the push.
We recommend you set your deliver-before-timestamp in your PAP XML to at least 1 hour in the future in GMT time just to make sure the push has enough time to deliver. Also, a device you're pushing to might be out of coverage for a period of time. So, you want to make sure that the push doesn't get dropped while the user is temporarily out of coverage or has their device off.
Thanks,
Matt
02-01-2013 09:50 AM
Hi Matt,
it's very possible, since I used current time + 5 minutes as the delivery date-time setting.
I'll try with 1 hour difference and see if that helps.
Thank you very much for you thorough help!
Martin
02-04-2013 05:04 AM
Hi Matt,
I just tried to send 3 PUSH notifications, none of which was delivered. Time period for those messages was 30 minutes, 1 hour and 2 hours from current time. If I send another batch of confirmed notifications and will ping you with their IDs again - could you check what's happened with them?
Martin
02-04-2013 08:46 AM
Hi Martin,
We can talk more through your private message, but the push messages are still expirying which means one of two things about the device you're trying to push to:
1) The device is out of coverage.
2) The device does not have a BIS-B service book (i.e. cannot access the Internet, etc. through the mobile network).
Thanks,
Matt