09-22-2013 02:00 AM
Hello all. I run into a problem testing the Push Service.
The app I'm testing uses appId in the ops variable to be used in the create push service. Let's say for example the app quit before the channel is being destroyed, how I can detect a channel being created and then delete it and create another channel when user load the app?
My app is having appId conflict as two of the testing app uses the same appId (forgot to change one the appId before loading ) and the push won't go to any of the app and I have to to a device wipe to try again.
Solved! Go to Solution.
09-25-2013 07:33 AM
Why are you destroying the channel every time the app is closed? The channel should stay created indefinitely. There is no easy way for your app to check to see if the channel is created or not, but tracking its status in memory would likely be your best option.
09-26-2013 10:25 PM
This is just to prevent two app from using the same appId. Probably it won't happen in live environment as user can only install one app.
While testing I have different version of the app and because of that there's conflict of appId (forgot to destroy the channel before loading another app **doh**). So I was wondering if there is a way to detect and delete channel.
09-27-2013 11:13 AM
You can save the channel status in device memory. That would be a very accurate way to know if the channel exists.
When the app is deleted the channel should be deleted as well.
Keep in mind that trying to test two apps on the same device using the same credentials is in gneral not a good idea. You should apply for a second set of credentials for the second app. Credentials are free and will save you having to worry about issues such as this one and conflicting registrations on the same device.