Hi to all,
I have struggling to test the android push notification system through ACS but weird things happen. I test the following scenario:
I have installed the app and using Ti.CloudPush.retrieveDeviceToken() I get a deviceToken, let's call it deviceToken1. I then register a channel, e.g. test_channel1.
I delete the app without first deregistering the test_channel1 above so the respective record stays in ACS admin panel.
I reinstall the same app (same id, same device). In this case the app may or may not acquire the same token as above**. I consider the case which a different token from Ti.CloudPush.retrieveDeviceToken() is retrieved, let's call it deviceToken2.
This time I only register to a different channel, e.g. test_channel2.
Concluding:
I have 2 records in ACS for the same app id and same device. Although my current installation has not registered for push notifications in test_channel1 but only in test_channel2 I still get push notifications for test_channel1.
I have tested all these in production version of the app.
**
What is a deviceToken? I mean is this something that every time has to be populated as the same result or not?
Documentation for Ti.CloudPush.retrieveDeviceToken() reads
This token is unique to each application and device.
What do we mean by "each application"? The app id, or it is a combination of other factors too (e.g. app version)?
I have noticed, as mentioned above, to get a different deviceToken in the same device installing the same app id. Is this normal? Am I missing something?
Any advice appreciated.
Application type: mobile Platform: Android Titanium SDK: 3.2.3.GA Device: Android device Host Operating System: OSX 10.8.5 Titanium Studio: build 3.2.3.201404181442