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
Developer
javayoung
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900
My Carrier: All
Accepted Solution

Pushed messages could not be received after a period of time

[ Edited ]

I just found a problem in the stability of push service. After the pushenabled application hang on in foreground for long time say one night, it could not receive the pushed messages until it has to subscribe to the push initiator again.

 

I am wondering whether there is a time limit for the established session of push service on the client application side.

Does someone also meet the similar condition and how to fix it?  Thank you




p(^_^)q
Good good study, day day up
Please use plain text.
BlackBerry Development Advisor (Retired)
mdandrea
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: Pushed messages could not be received after a period of time

Hi,

 

When you say "subscribe to the Push Initiator again", you mean perform a create channel?  (This will subscribe with the public/BIS PPG under the covers - not your Push Initiator which sends the pushes.)

 

No, I haven't seen the scenario you're talking about.

Just to make sure I understand it correctly: You start up the app and leave it running in the foreground overnight.  Then, the next morning, you send a push to the app and it never arrives?  Is that right?

 

Also, are you testing with a Dev Alpha Device (and, if so, is it A or B) or are you using a BlackBerry Z10?

 

Thanks,

 

Matt

Please use plain text.
BlackBerry Development Advisor (Retired)
marco_dicesare
Posts: 76
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: Pushed messages could not be received after a period of time

Also, there is no time limit on the life of a session. You only need to create the session once on each app startup. The create channel technically only needs to only be done once ever but it is recommeded to occassionally re-create the channel (e.g. either: once per device re-start or once a week or once a month...whatever suits your app) as it can be destroyed by the push server without the application knowing about it. For example, say you send a push to a device and it fails to be delivered. If a time period of say, 60 days passes, and you send another push to the same device and it fails to be delviered again then it will automatically have it's channel destoryed by the push server without the application knowing about it.

Please use plain text.
Developer
javayoung
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900
My Carrier: All

Re: Pushed messages could not be received after a period of time

[ Edited ]

Yes, it has to create a channel to subscribe to the push initiator (call RegisterService::subscribeToPushInitiator) again, then the pushed messages can be received.

 

"Just to make sure I understand it correctly: You start up the app and leave it running in the foreground overnight.  Then, the next morning, you send a push to the app and it never arrives?  Is that right?"

-> It is correct and exactly same as my testing steps. I also confirmed the push initiator server side is working properly.

 

I am tesing with a Dev Alpha A. And I also found for my another Dev Alpha A, it could not receive pushed message either by the same testing condition. But after I reboot it without re-subscribe, it can receive the pushed messages again.

 

It is why I am wondering whether there is a timeout for the session of push service or not on the client side?

 

I am so appreciated with your always quick reply.

 

 




p(^_^)q
Good good study, day day up
Please use plain text.
Developer
javayoung
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900
My Carrier: All

Re: Pushed messages could not be received after a period of time

Thank you for your reply. Yes, I think so. For the session, it should be permanent. For the channel, it is only necessary at the registration step, once registered, the app doesn't need to create a channel again.




p(^_^)q
Good good study, day day up
Please use plain text.
BlackBerry Development Advisor (Retired)
mdandrea
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: Pushed messages could not be received after a period of time

Creating a channel and subscribing with the Push Initiator are two separate concepts.  Creating a channel registers your application with the BIS PPG.  Subscribing with the Push Initiator is a subscription to your own server-side push application (that you use to send out pushes).  

 

I'm thinking you mean that you have to create the channel again after having the app run in the foreground overnight.  

 

You're using the Push Collector app, right?  Are you just clicking the Register button again on the register dialog?

 

Thanks,

 

Matt

Please use plain text.
Developer
javayoung
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900
My Carrier: All

Re: Pushed messages could not be received after a period of time

Ok. I got it. Because I am reviewing PushCollector right now, I found before subscribe to the push initiator, it must create a channel at first. Yes, I am just using PushCollector to test my push initiator. Everytime, I has to click register button, then the pushed messages can be received properly after leaving the PushCollector for long time in the foreground..




p(^_^)q
Good good study, day day up
Please use plain text.
BlackBerry Development Advisor (Retired)
mdandrea
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: Pushed messages could not be received after a period of time

Ok, thanks, now I understand.  Let me setup a test device of my own and see if I can reproduce this issue on a Z10 device.

Please use plain text.
BlackBerry Development Advisor (Retired)
mdandrea
Posts: 311
Registered: ‎08-08-2012
My Device: BlackBerry Z10
My Carrier: Rogers

Re: Pushed messages could not be received after a period of time

Oh, sorry, one more question.  What OS build do you have running on your Dev Alpha?  The latest - 10.0.10.263?

 

Thanks,

 

Matt

Please use plain text.
Developer
javayoung
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900
My Carrier: All

Re: Pushed messages could not be received after a period of time

Thank you for your quick reply.

 

It should be 10.9.10.35 on my device. 10.0.10.261 on my IDE.




p(^_^)q
Good good study, day day up
Please use plain text.