Is it possible to detect Android app uninstall?

后端 未结 7 846
清酒与你
清酒与你 2020-11-22 11:18

My app is using Google\'s C2DM (push notification) to notify users about new activity from friends. Once they install the app I register the device with C2DM servers and sto

相关标签:
7条回答
  • 2020-11-22 12:14

    The GCM documentation explains this situation here:

    https://developers.google.com/cloud-messaging/registration#how-uninstalled-client-app-unregistration-works

    "An application can be automatically unregistered after it is uninstalled from the device. However, this process does not happens right away, as Android does not provide an uninstall callback."

    Basically when GCM tries to send the next push notification, the device will tell GCM the receiving application was uninstalled.

    As for notifying friends that their friends aren't using the app any more, GCM will send a NotRegistered error to your notification server when this failure occurs; it won't be immediate, but could you use that?

    0 讨论(0)
提交回复
热议问题