简体   繁体   中英

Application Files and Folders cleanup when Uninstalling the App

I have an app that allows exporting files to a non-standard folder on the device's file system.

I put the exports in a folder separate from the application data, because I want the user to be able to navigate to the files using a file-system explorer, and the application data folders/files are not accessible that way.

However, when the application is uninstalled, those non-application-data folders, the folders separate from the application-data file structure, are left behind.

Is there anyway to call an uninstall script, and if so, how is the script called/executed when uninstalling through Android Market or through the device's uninstall in the settings for 'Manage Applications'?

Intent.ACTION_UNINSTALL_PACKAGE

I believe this should work for you. Unfortunately, it's for API 14. I don't know it that falls into your needs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM