Can anyone tell me if it is possible in Flutter or more generally in mobile development to handle when the user uninstalls the app so that we can perform some actions? I know that we can easily detect when the app switch to the background but I don't figure out if detecting the uninstallation is actually possible.
2 Answers
for iOS you need a APNs (Apple Push Notification service), this way says you that the token is invalid, so, it mean that the device already hasn't the app
check out: How To Track App Uninstall Effectively
1 Comment
Tristan Bilot
This is a pretty nice method thanks! I need to use that in order to remove Firebase Cloud Messaging device IDs in the database when the user uninstalls the app.
@Nuqo is right. There is not a quick way to handle the uninstallation of the app. But you can design a notification system, and push notifications periodically. Firebase will respond error message with "NotRegistered". This means the user is uninstalled your app.
Read more from the official document.
1 Comment
genericUser
That's works only for Android. For IOS you will have to take a different approach clevertap.com/blog/track-app-uninstalls-effectively