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
evgenygrinfeld
Posts: 2
Registered: ‎07-06-2010
My Device: 8310
My Carrier: Orange

Re: Push API sample code needed

[ Edited ]

Does anybody know how to send push notification with RIM push format through BIS?

Please use plain text.
Administrator
MSohm
Posts: 14,446
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Push API sample code needed

 


evgenygrinfeld wrote:

Does anybody know how to send push notification with RIM push format through BIS?


This is not supported.  The BlackBerry Push Service (push through BIS) only supports the PAP push format.  Not the RIM push format.

 

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
raquibulbari
Posts: 137
Registered: ‎09-30-2009
My Device: Torch 9800

Re: Push API sample code needed

 


challgren wrote:

Here's some updated code. Improves error handling and includes HTML form



 

Hi challgren

Thanks for your PHP codes, I tried to use your code in my server. The PHP page can connect to RIM eval server when using http but when using https it cannot connect. Some kind of SSL error happens. So do I really need the https or I can use http ?

 

Also I am unable to receive the message in real device. In real device I only opened a stream connection at the port given by RIM. Do I have to do anything else in my client application?

 

It would be great if anybody can help.

 

regards

Raquibul Bari

----------------------
Press like if you find a message helpful
---------
Please use plain text.
Developer
raquibulbari
Posts: 137
Registered: ‎09-30-2009
My Device: Torch 9800

Re: Push API sample code needed

hi all

I could send push data to the server, the client does not receive it. I found that the device need to subscribe to content provider and rim PPG to receive push messages. 

 

What I understood, might be wrong

The device first contacts content server for a subscription and then the content server returns a response by contacting to the RIM server

then the device need to do a subscription request to rim server with the data

 

Is this process correct? If so does anyone have the PHP code for server side subscription?

 

regards

 

----------------------
Press like if you find a message helpful
---------
Please use plain text.
New Developer
JGao12345678
Posts: 46
Registered: ‎07-05-2010
My Device: 9630
My Carrier: Telus

Re: Push API sample code needed

Hi everyone,

I use the Push API sample code for C# posted by . It is works well. But after I send the PAP request to the PPG, I get the error as: "The content you have requested is not available
" and "PD_pushReq??????uest command is not currently in service!". Could you tell me what reason that case this problem?

Please use plain text.
New Developer
JGao12345678
Posts: 46
Registered: ‎07-05-2010
My Device: 9630
My Carrier: Telus

Re: Push API sample code needed

[ Edited ]

Should I do the registration, before I do PAP push request?

For the registration, the url is

"http://pushapi.eval.blackberry.com/mss/PD_subReg?serviceid=########&osversion=5.0.0&model=9700".

 

Please use plain text.
Developer
raquibulbari
Posts: 137
Registered: ‎09-30-2009
My Device: Torch 9800

Re: Push API sample code needed

[ Edited ]

 


JGao12345678 wrote:

Should I do the registration, before I do PAP push request?

For the registration, the url is

"http://pushapi.eval.blackberry.com/mss/PD_subReg?serviceid=########&osversion=5.0.0&model=9700".

 


 

In order to receive push message in device it needs to be registered first. You can push content before registering. The registration url is as you have stated. Pleas check your C# code for pushing data to RIM server.

 

During registration you have to do two requests

1. the url as you have said, which on success will return something like param=xxxxxxx

2 in the second request append this data with the first url.

So url will look like

http://pushapi.eval.blackberry.com/mss/PD_subReg?serviceid=########&osversion=5.0.0&model=9700&responsefromfirstrequest

 

 

----------------------
Press like if you find a message helpful
---------
Please use plain text.
New Developer
JGao12345678
Posts: 46
Registered: ‎07-05-2010
My Device: 9630
My Carrier: Telus

Re: Push API sample code needed

Hi Raquibulbari,

Thank you for your replay.

I user real device to do registration and get OK result.

Than I send the pap push using C# code and the PAP Content following as

--Bw6t3PCp48SkNg92AnYr
Content-Type: application/xml; charset=UTF-8

<?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="129234297065937500" deliver-before-timestamp="2010-07-14T13:35:06Z" source-reference="xxx-xxxxxxxxxxxxxxxx">
<address address-value="yyyyyyyy"/>

<quality-of-service delivery-method="unconfirmed"/>
</push-message>
</pap>
--Bw6t3PCp48SkNg92AnYr
Content-Type: text/plain
Push-Message-ID: 129234297065937500

Test
--Bw6t3PCp48SkNg92AnYr--

 

But I get a response as:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>Pushdata Service</title>
<body bgcolor="white" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
<form enctype="application/x-www-form-urlencoded" method="get">
<br clear="none"/>
<font color="#777777" size="1" style="verdana">Error </font>
<br clear="none"/>
<br clear="none"/>
<font color="#777777" size="1" style="verdana">The content you have requested is not available</font><br clear="none"/>
<!-- Error message -->
<!-- dynamic @[errormsg] token -->
<br clear="none"/>
<font color="#777777" size="1" style="verdana">PD_pushReq??????uest command is not currently in service!</font>
<br clear="none"/><br clear="none"/>
<!-- Footer -->
<!-- static error footer library -->
<br clear="none"/>
</form>
</body>
</html>

 Do you know how about this problem?

Please use plain text.
Developer
raquibulbari
Posts: 137
Registered: ‎09-30-2009
My Device: Torch 9800

Re: Push API sample code needed

I think their service might be down now
----------------------
Press like if you find a message helpful
---------
Please use plain text.
New Developer
JGao12345678
Posts: 46
Registered: ‎07-05-2010
My Device: 9630
My Carrier: Telus

Re: Push API sample code needed

Hi Raquibulbari,

Thank you.

Please use plain text.