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

BlackBerry Push Development

Reply
New Contributor
martinambrus
Posts: 6
Registered: ‎01-31-2013
My Device: Curve 9315
My Carrier: Vodafone

BlackBerry PUSH service not sending notifications

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

  • we have BlackBerry BIS data plan active on the SIM card
  • mobile data transfer is enabled on the device (both, Wi-Fi connection and mobile data are enable in fact)
  • we use the pushapi.eval.blackberry.com address provided by BlackBerry, starting on our unique ID (full url: http://XXXX.pushapi.eval.blackberry.com/mss/PD_pushRequest)
  • we're using correct application ID and password assigned to us by BlackBerry (we wouldn't be able to query for registered devices at all without this anyway)
  • we tried with both, application active and inactive, even with the application closed alltogether - the notification never gets through
  • the OS is BlackBerry 7, phone BlackBerry Curve 9315

Any ideas?

Please use plain text.
BlackBerry Development Advisor (Retired)
mdandrea
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: BlackBerry PUSH service not sending notifications

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

Please use plain text.
New Contributor
martinambrus
Posts: 6
Registered: ‎01-31-2013
My Device: Curve 9315
My Carrier: Vodafone

Re: BlackBerry PUSH service not sending notifications

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

Please use plain text.
BlackBerry Development Advisor (Retired)
mdandrea
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: BlackBerry PUSH service not sending notifications

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

Please use plain text.
New Contributor
martinambrus
Posts: 6
Registered: ‎01-31-2013
My Device: Curve 9315
My Carrier: Vodafone

Re: BlackBerry PUSH service not sending notifications

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

Please use plain text.
BlackBerry Development Advisor (Retired)
mdandrea
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: BlackBerry PUSH service not sending notifications

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

Please use plain text.
BlackBerry Development Advisor (Retired)
mdandrea
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: BlackBerry PUSH service not sending notifications

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 

Please use plain text.
New Contributor
martinambrus
Posts: 6
Registered: ‎01-31-2013
My Device: Curve 9315
My Carrier: Vodafone

Re: BlackBerry PUSH service not sending notifications

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

Please use plain text.
New Contributor
martinambrus
Posts: 6
Registered: ‎01-31-2013
My Device: Curve 9315
My Carrier: Vodafone

Re: BlackBerry PUSH service not sending notifications

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

Please use plain text.
BlackBerry Development Advisor (Retired)
mdandrea
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: BlackBerry PUSH service not sending notifications

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

Please use plain text.