Android:managespaceactivity Let apps manually manage your app's data Catalog

Source: Internet
Author: User

Today the Android encounters a requirement that does not allow the user to completely clear the app Private directory (/data/data/package name/), but Android by default the user clicks the erase data in the app information The button completely clears all the data files in the application's private directory, including Sharedpreference, cache files, databases, and other important data.

If we don't want users to do this, we need to use The android:managespaceactivity property, which is a property of the application tag in Androidmanifest.xml, is used to designate an activity to manage the data

, plus this attribute, specifies that settingactivity is the activity that manages the space

<application android:managespaceactivity= ". Activity. Settingactivity "></application>

Let's look at the Android app information interface

This time to clear the Data button programming management Space , after clicking, start the specified activity, I only allow to delete the cache file and clear the database in the collection table


Android:managespaceactivity Let apps manually manage your app's data Catalog

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.