Flutter - How can I follow the uninstall of the application?

Viewed 232

I am developing a flutter app. I want to update its status in my database when the user deletes the app from own phone. How can I follow these changes? Is it possible on flutter?

1 Answers

There is no way to do it in iOS, but for android, you can use device_apps package to get the current list of installed apps and then compare it to the previously fetched data.

First, add this to your androids manifest file:

<manifest...>

    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />

</manifest>

and then use it:

List<Application> apps = await DeviceApps.getInstalledApplications();
Related