简体   繁体   中英

I want to password protect my local phone directory folder in android

I want to password protect my local phone directory folder This folder (directory) has been created by my application at run time with password protection. My application can open this folder and used for self. Any one can't open this folder manually. It is possible in android.

Thanks in advance.

This is not possible on Android.

You could create your folder on the internal memory, so that only your app can access it on normal devices. However, anyone with a rooted device will be able to browse your folder using a file manager, and other apps will also be able to read its contents if given root access.

A folder on the external storage is accessible to all apps with the READ_EXTERNAL_STORAGE permission, so you'll want to avoid using that.

At any rate, there is no 100% effective way to secure your folder such that only your app can access it.

However, you could try encrypting your data. This is what many apps like whatsapp do. Even when Whatsapp backs up the chats to the external storage, it is AES encrypted so that while others can access the data, they can't read it without decrypting it first. I would recommend that your try encryption

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