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:
01-31-2013 09:26 AM
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?
01-31-2013 09:34 AM
Hi Matt and thank you for your response!
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?
01-31-2013 10:21 AM
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?
02-01-2013 02:37 AM
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.
02-01-2013 08:18 AM
Could you please send a confirmed push.
So, in your PAP XML, you would have a quality of service that says "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.
02-01-2013 09:48 AM
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.
02-01-2013 09:50 AM
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!
02-04-2013 05:04 AM
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?
02-04-2013 08:46 AM
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).