I have a service running in an android app. When the user goes to Settings -> App Manager and clears the app data, it clears all the databases, files, sharedpreferences, contentproviders of the app. Also, kills the services running. I am looking to auto-start the service after the 'Clear Data' event. Or otherwise, listen to the 'Clear Data' event.
Android provides broadcast intent ACTION_PACKAGE_DATA_CLEARED
. But I get this broadcast when any other app's data is cleared.