tags:

views:

112

answers:

2

Is there a way to get a system notification when an app has been uninstalled?

I would like to maintain a table of all clients' info currently using my app. However, that seems impossible if there is no way to detect this event.

The first solution I can think of is to have an always running service in the background listening for android.intent.action.PACKAGE_REMOVED. But then would that service be killed once the uninstallation process has ended, or would it be stopped just before the process has kicked off? Also even if this is a solution it's has the potential to put off a lot of people when they realise that part of the app is running in the background.

Any suggestions? Thanks!

+1  A: 

You could simply do it the other way round and maintain a table of users actively using your app. Just call a webservice at a point in the program that show it is active. If an app isn't used for a certain time mark it as inactive.

Janusz
+1  A: 

The documentation for the PACKAGE_REMOVED action says the following:

The package that is being uninstalled does not receive this Intent.

So you can monitor for other applications being uninstalled but not your own.

So you'll probably need track who is still using your application, not who has stopped using it. If you don't want the overhead of having your own server to do this you could use a free service like Flurry.

Dave Webb
Who has used my app recently is not an accurate measurement, and this does not satisfy my needs. I'm using GAE so I'm not worried about the server-side.
mobilekid