Android C2DM : Duplicate message to the same device and App

后端 未结 5 452
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-17 21:25

I\'m wondering if anyone has faced this issue with Google C2DM? This is the scenario I am faced with:

  1. User installs the app and registers with C2DM server for
5条回答
  •  野的像风
    2021-01-17 21:35

    This should only happen for the first push notification after re-installing your application.

    Google C2DM service is working in passive mode when it comes to detecting uninstalled applications.

    First push notification after uninstalling your application (without unregistering from C2DM!!!) will NOT return any error in response. However, the second push notification will return an "invalid registration" or "not registered" error codes where you can realize the application was uninstalled.

    The reason is that C2DM servers return the response code immediately and only then tries to push the client. When client respond that an application was uninstalled, it is deleted from C2DM servers. Next push attempt will return an error code immediately.

提交回复
热议问题