While testing, you may occasionally see the same push arrive twice on your test devices.
This occurs because in certain situations, an Android Channel ID (the Urban Airship generated push identifier) can become temporarily associated with two GCM Registration IDs (a per-app Google supplied identifier).
The most common cause of this is frequent uninstallation and reinstallation of an app during testing.
What to do if your app's Channel ID becomes associated with two GCM Registration IDs:
There are three ways to correct duplicate pushes caused by a shared GCM Registration ID without releasing a new app version that specifically calls de-registration and re-registration:
- Send a unicast message directly to one or more Android Channel IDs. Our library will detect if the Channel ID that the notification was sent to doesn't match the current Channel ID on the device. If it doesn't match, it will send a delete callback for that old Channel ID, marking it inactive so as to not receive any future pushes.
- Wait. If the app is uninstalled at the time of push or the GCM Registration ID is no longer valid we will receive feedback from Google that this is the case and we will deactivate Channel IDs associated with that GCM Registration ID.
- Use your Urban Airship dashboard to delete all Channel IDs associated with your development application (this option is not available for production applications). Please Note: No devices will receive push notifications until they are reopened and can register with Urban Airship again.