ACTION_APP_PRE_UNINSTALL
An intent service intent that indicates the target app will be uninstalled in the next 5 seconds. After 5 seconds any processes associated with the app are killed and the app is uninstalled. The service started by this intent must be an intent service.
Apps can use this time to perform any required cleanup actions. For example, remove any inventory items your app created that do not make sense without your app or order types created that are specific to your app. This intent should not trigger anything that is visible to or require any interaction with the user. Preferably all work is completed synchronously within the bounds of the android.app.IntentService's onHandleIntent method. Note that this is a service intent, not a broadcast intent. It must be received by an (intent) service, not a broadcast receiver.
<service
android:name=".MyCleanupService"
android:exported="true">
<intent-filter>
<action android:name="com.clover.intent.action._APP_PRE_UNINSTALL"/>
</intent-filter>
</service>
Content copied to clipboard
adb shell am startservice -a com.clover.intent.action.APP_PRE_UNINSTALL -n your.packagename/.MyCleanupService
Content copied to clipboard