Need some information about how to check whether an Android app is being uninstalled or is uninstalled so that App Server comes to know that a user has uninstalled the app.
Any Help is appreciated.
Need some information about how to check whether an Android app is being uninstalled or is uninstalled so that App Server comes to know that a user has uninstalled the app.
Any Help is appreciated.
Short answer is an app cannot know when it's being uninstalled.
An Android application can register a BroadcastReceiver to receive events of other applications being installed, but not itself.
I personally believe that the reason is basically to prevent applications from doing something (annoying to the user) if they're being uninstalled.
ACTION_PACKAGE_REMOVED will be sent to all other app once an app is uninstalled but not itself.
But somehow we can check once in a while, is user uninstalled an app via FCM if a notification is sent successfully that means user is currently using it if it is not then we can say that user may have uninstalled the app.
This may may not provide the actual result but this is the only way available.