Hi, I'm just exploring the docs trying to get ready to implement ADM. One thing I do not see documented that I expect is a list of response codes that I should expect after delivering a notification message (as in GCM) or perhaps a separate API that I need to poll occasionally to retrieve a list of invalid device IDs (as in APN). Can someone point me to the guidelines for ADM on how to know when a device ID should be removed from my distribution? Thanks! Ian
Hi Richard, The response format and codes are given here :
https://developer.amazon.com/sdk/adm/sending-message.html#ResponseFormat There is no separate api that could be called offline to detect invalid device IDs as of now. Only way to do it after receiving the response for sending message request. If you receive 400 with reason "Unregistered", you should remove the registration Id from your data base. Also you should consider canonical registration Id which is sent back with the response (200 response code) to your "send message" request. Like, if one user of your app receives new registration Id (e.g after uninstall the app and reinstall it) and you still try to send message to old registration Id for the same user + app + device, you would receive the canonical registration id (the new registration id that is assigned to the same app instance) back in the response though the message would be delivered.