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
rinthe
Posts: 3
Registered: ‎04-19-2012
My Device: N/A

Blackberry Push Plus subscriber status

I have Blackberry Push Plus, and I'd like to use the status query to check the status of pushed messages. So, when I send a push, I immediately send a status query message, which looks like this:

 

<?xml version="1.0"?>
<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.1//EN"
"http://www.openmobilealliance.org/tech/DTD/pap_2.1.dtd">
<pap>
    <statusquery-message push-id="123456">
    </statusquery-message>
</pap>

 

The response I get back looks like this:

 

<?xml version="1.0"?>
<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.1//EN" "http://www.openmobilealliance.org/tech/DTD/pap_2.1.dtd">
<pap>
<statusquery-response push-id="123456">
<statusquery-result event-time="2012-04-19T18:36:37Z" message-state="unknown" code="2001" desc="The request was refused. Status Query is not supported by your Push Service.">
</statusquery-result>
</statusquery-response>
</pap>

 

Why is saying this is not supported by my service? I thought that was the whole point of push plus. The device receives the pushed message just fine. I just want to know why I can't query on the status of the push.

 

thanks,

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

Re: Blackberry Push Plus subscriber status

Are you sure you are configured for Push Plus? The error seems to indicate that your account is only provisioned for Essentials.

 

Also, there is no need to send the query right after the push, if you need to know as soon as the push is delivered then I would suggest push notifications rather than querying the status of every push. Status queries are good if you failed to receive a notification and need to check if it was delivered, but shouldn't be needed for every push sent.

Garett
@garettBeuk
--
Goodbye everybody!
New Contributor
rinthe
Posts: 3
Registered: ‎04-19-2012
My Device: N/A

Re: Blackberry Push Plus subscriber status

Thanks very much for your response. The person who registered for the service received an email that started off with:

Hello,
Many thanks for your registration with the BlackBerry Push Service!
Credentials have been assigned to your application for the BlackBerry Push Service Evaluation

It went to list the application id, password, etc. One of the items it listed was "Service Type" which was set to "Plus". So, as far as I can tell, it's Push Plus. Is there more that we have to do to enable it? Is this because it was an evaluation version.

Also, I don't plan on normally querying the status of every push. It's just that we were troublshooting other issues, and we thought the status query would help, but we could never get it to work.

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

Re: Blackberry Push Plus subscriber status

May be a good idea to send an email to  BlackBerryPushServices@rim.com just to verify your account is configured as expected on the eval server. Be sure to send your app ID, account username and any other info that may be relevant.

Garett
@garettBeuk
--
Goodbye everybody!
New Contributor
rinthe
Posts: 3
Registered: ‎04-19-2012
My Device: N/A

Re: Blackberry Push Plus subscriber status

Thanks a bunch. I have sent them an email and I will await the response.

thanks!
Developer
bert2002
Posts: 172
Registered: ‎05-01-2010
My Device: Z10

Re: Blackberry Push Plus subscriber status

Hi,

 

I am trying to achieve the same thing. How do you send the request to RIM and to which server? Unfortunatly I cant find this anywhere documented... Do you have any document or even a example?

 

Thanks.



----------------------------------------------------------
find my widgets -> http://blackberry.itbert.de
Retired
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

Re: Blackberry Push Plus subscriber status

You would send the request the same as any other. The following is documentation of these how to make the call:

http://docs.blackberry.com/en/developers/deliverables/25167/Status_query_request_604572_11.jsp

Garett
@garettBeuk
--
Goodbye everybody!
Developer
bert2002
Posts: 172
Registered: ‎05-01-2010
My Device: Z10

Re: Blackberry Push Plus subscriber status

Hi,

 

exactle the same? Same url and authentification and only the message is changed from http://docs.blackberry.com/en/developers/deliverables/25167/Code_sample_push_request_604335_11.jsp to http://docs.blackberry.com/en/developers/deliverables/25167/Code_sample_status_query_604357_11.jsp

 

I am trying and getting an 2000er error.

 

The request looks basically like:

 

    $data = '
    <?xml version="1.0"?>
    <!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.1//EN"  "http://www.openmobilealliance.org/tech/DTD/pap_2.1.dtd">
    <pap>
    <statusquery-message push-id="'.$pushid.'">
    </statusquery-message>
    </pap>';

    // set URL and other appropriate options
    curl_setopt($ch, CURLOPT_URL, $pushurl);
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_USERAGENT, "BB Push Server/1.0");
    curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERPWD, $appid . ':' . $password);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: multipart/related; boundary=mPsbVQo0a68eIL3OAxnm; type=application/xml", "Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2", "Connection: keep-alive"));

    // grab URL and pass it to the browser
    $xmldata = curl_exec($ch);

 

 

Response:  

Array ( [0] => Array ( [tag] => PAP [type] => open [level] => 1 ) [1] => Array ( [tag] => BADMESSAGE-RESPONSE [type] => complete [level] => 2 [attributes] => Array (
   [CODE] => 2000 [DESC] => 2000 [BAD-MESSAGE-FRAGMENT] => 2000 ) ) [2] => Array ( [tag] => PAP [type] => close [level] => 1 ) )

 

Can this be correct?



----------------------------------------------------------
find my widgets -> http://blackberry.itbert.de
Retired
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

Re: Blackberry Push Plus subscriber status

As this issue is unrelated to the orignal post could you please start a new thread and post back its URL? I can continue working to help find the issue once this is done.

Garett
@garettBeuk
--
Goodbye everybody!
Developer
bert2002
Posts: 172
Registered: ‎05-01-2010
My Device: Z10

Re: Blackberry Push Plus subscriber status

Of course. Would appreciate if you could have a look in to http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Query-Message-Status/td-p/1685637 

 

Thanks.



----------------------------------------------------------
find my widgets -> http://blackberry.itbert.de