02-21-2013 08:39 AM - edited 02-21-2013 08:40 AM
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
Solved! Go to Solution.
02-21-2013 08:45 AM
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?
02-21-2013 08:56 AM
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.
02-21-2013 08:58 AM - edited 02-21-2013 11:25 AM
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.
02-21-2013 09:04 AM
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.
02-21-2013 09:12 AM
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?
02-21-2013 09:23 AM
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..