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

Java Development

Reply
Contributor
Posts: 12
Registered: ‎05-17-2011
My Device: 8900
My Carrier: IT
Accepted Solution

Unable to get push notifications on Blackberry device by using HttpPushDemo application

Hi all,

I am running HttpPushDemo client application on simulator and i am able to get the notifications sent from the server applicatoin successfully.

Now I run the same client application on my BlackBerry device which is BES enabled but i am not able to get push notifications.

I made following changes on server applicaion
 - DEVICE_PIN = Device PIN No("26DEA1CF");
 - DEVICE_PORT = "100";
 - MDS_PORT = 8080;

Inside getPushURL()
 - _pushURL = new URL("http", BES IP address or Host Name, MDS_PORT, "/push?DESTINATION="+ DevicePin +"&PORT="+DEVICE_PORT+"&REQUESTURI=BES IP address or Host Name");

Inside papPush()
 - String mdsHost = BES IP address or Host Name;

When i run the server application it gives me IOException with 400 response code.

I also checked the MDS Status page using http://<BES IP address>:8080.

Can anyone tell me that provided information is correct and what else I have to check to make sure that the application will work on device.

Thanks in advance.

Developer
Posts: 16,647
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Unable to get push notifications on Blackberry device by using HttpPushDemo application

400 means bad request. most likely there is a syntax error.
i use the url without a set request uri (&REQUESTURI=/), otherwise the url looks good to me.
maybe 100 is too low a port to use? just guessing there though.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
Posts: 12
Registered: ‎05-17-2011
My Device: 8900
My Carrier: IT

Re: Unable to get push notifications on Blackberry device by using HttpPushDemo application

Hi Simon,

Thanks for the quick reply :smileyhappy:

I guess you are right. It might be problem of low port number. I will try that.

Since I was unable to push data to my application, I tried to push data to device's browser. I carried out the below given steps:

1. Changed the port number from 100 to 7874 (default port number of device's browser)

2.  Rebuild and run the server application and sent the data.

 

But still no luck, data is not pushed on device's browser.

Am I missing something? Or I have to do any changes in BES or in MDS to push the data?

 

Thanks in advance.

Kaushik

Contributor
Posts: 12
Registered: ‎05-17-2011
My Device: 8900
My Carrier: IT

Re: Unable to get push notifications on Blackberry device by using HttpPushDemo application

Hi,

 

Now I am able to get notifications on my mobile client.

 

Just commented the "X-RIM-Push-Reliability-Mode" property or changed it's value from "APPLICATION" to "TRANSPORT" inside postData() method.

e.g conn.setRequestProperty("X-RIM-Push-Reliability-Mode","TRANSPORT");

 

Note -It works for RIM push format only. Still I am not able to get notifications on device with PAP push format.

 

Thanks to all.

 

- Kaushik