Skip to content Skip to sidebar Skip to footer

Is It Possible To Intercept App Uninstall?

Is it possible to intercept app uninstall and make some job? E.g. my app modifies some files of device, so it would be neat before uninstalling just rollback changes made by my app

Solution 1:

Are you talking about the similar issue

Listen Broadcast Before application uninstall

Then as said you have to use the intent-filter for delete as given in the above link.

<activityandroid:name=".UninstallIntentActivity"android:label="@string/app_name" ><intent-filter><actionandroid:name="android.intent.action.MAIN" /><categoryandroid:name="android.intent.category.LAUNCHER" /></intent-filter><intent-filter><actionandroid:name="android.intent.action.VIEW" /><actionandroid:name="android.intent.action.DELETE" /><categoryandroid:name="android.intent.category.DEFAULT" /><dataandroid:scheme="package"  /></intent-filter></activity>

and when you get notified , do whatever you want.

Post a Comment for "Is It Possible To Intercept App Uninstall?"