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
Contributor
Posts: 12
Registered: ‎09-04-2012
My Device: 9700 bold
My Carrier: Personal

Can anyone proved the sample code for acknowledgement.

Hello,

I am looking if someone can post somesample code for acknowledgement. Thanks

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Can anyone proved the sample code for acknowledgement.

WHat platform are you using (BlackBerry 10?) What language?

 

Also, are you using Push Essentials, Push Plus or BES Push? For the last 2 Push acknowledgement is built into the APIs, for the first you could pretty much post an acknowledgement in whataver format your server-side requires.

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 12
Registered: ‎09-04-2012
My Device: 9700 bold
My Carrier: Personal

Re: Can anyone proved the sample code for acknowledgement.

I am using the API 5.0. I am able to send and receive push messages to the devices but how can I know if the device accepted and read the message from the server?

Contributor
Posts: 12
Registered: ‎09-04-2012
My Device: 9700 bold
My Carrier: Personal

Re: Can anyone proved the sample code for acknowledgement.

I am using Push Plus
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Can anyone proved the sample code for acknowledgement.

Take a look at the HTTPPushDemo, this shows how acknowledgements can be sent. In short the MDSPushInputStream class' accept() method will handle this four you:

http://www.blackberry.com/developers/docs/7.0.0api/net/rim/device/api/io/http/MDSPushInputStream.htm...

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 12
Registered: ‎09-04-2012
My Device: 9700 bold
My Carrier: Personal

Re: Can anyone proved the sample code for acknowledgement.

where do I see in the server the ack?
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Can anyone proved the sample code for acknowledgement.

This is a standard HTTP Post, your server needs to be configured to receive these ACKs.

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 12
Registered: ‎09-04-2012
My Device: 9700 bold
My Carrier: Personal

Re: Can anyone proved the sample code for acknowledgement.

I have the Push libraries in my server and my notification url is accesible from internet, shouldn't it be managed by these libraries?
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Can anyone proved the sample code for acknowledgement.

Yes, but your server still needs to be configured to receive the ACK at the specified URL (including port). Also, have you registered this exact URL when applying for Push Plus/Eval?

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 12
Registered: ‎09-04-2012
My Device: 9700 bold
My Carrier: Personal

Re: Can anyone proved the sample code for acknowledgement.

I pointed the URL to the /notification servlet, should I use another one?