Tristan Bilot
Tristan Bilot

Reputation: 479

How to handle app uninstallation in Flutter/Dart?

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.

Upvotes: 10

Views: 7000

Answers (2)

Akif
Akif

Reputation: 7640

@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.

Upvotes: 2

Nuqo
Nuqo

Reputation: 4081

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

Upvotes: 3

Related Questions