简体   繁体   中英

How do I create a directory at /0 on Android?

I'm having a problem with my users (Android). They delete the app, and their data is gone. They expect it not to be.

Browsing my phone, I see a lot of apps put a folder right off of /internal shared storage. IE I click on internal shared storage and there's a bunch of folders for various apps with data in them that doesn't go away if I uninstall the app.

This is what my customers want. This is what will stop them from writing me and accusing me of destroying their data.

How do I get a path to that folder, and what permission do I need to write there?

First off, deleting when the app is gone is how Android works. Anything else is a bug that you should expect to see fixed.

Secondly, you can't put anything right in / anymore. There was a time you could, but that's long since gone.

Third, have you looked into Android Data Backup? https://developer.android.com/guide/topics/data/backup This will work even on a new device, so its a better path forward anyway

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