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
bbam
Posts: 8
Registered: ‎09-17-2010
My Device: Storm 9550
My Carrier: Verizon

Blackberry Push Service API - Registering/Unregistering

I am using the push API in my app.  Sometimes despite returning a status of "Active" the push messages don't arrive.  I happened to notice in the device event logs that sometimes I am seeing posts to http://pushapi..../pd_subdereg... (the equivalent of PushApplicationRegistry.unregisterApplication) immediately after the status has returned "Active" even though I do not call that push api method in my app.

 

Is there some reason the push api would be calling unregister by itself? 

 

A google search led me to this link, https://developer.blackberry.com/html5/apis/blackberry.push.html, which states, "It is possible for the BlackBerry Push Service to automatically unregister a subscriber behind the scene." 

 

Could this be true?  If so, under what circumstances?

Please use plain text.
Developer
crispyoz
Posts: 223
Registered: ‎10-01-2011
My Device: Bold 9900

Re: Blackberry Push Service API - Registering/Unregistering

If you are basing your device application on the sample app the only time it will deregister automatically is if it detects a SIM change.  I would log a stack trace in the unregister command in PushController so you can see hwo it is being called.

 

hth

 

Chris

 

-----------------------------------------------------

if I helped you press LIKE button 

 

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Blackberry Push Service API - Registering/Unregistering

A quick test you could do to verify if unregister is actually being called or whether it is showing in the logs for some other reason would be to perform a subscription query:

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

 

This will let you see if the PIN you are pushing to is currently subscribed.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.