简体   繁体   English

在Android的sd卡中隐藏文件

[英]Hiding Files in sd-card in Android

i am creating an android app.我正在创建一个 android 应用程序。 i need to hide files in my sd card or put files in an folder n protect it using password only accessible by my app.我需要隐藏我的 SD 卡中的文件或将文件放在一个文件夹中 n 使用只能由我的应用程序访问的密码来保护它。 Any suggestion regarding this.关于此的任何建议。

There's basically 2 things you can do.基本上你可以做两件事。

  1. Use internal storage .使用内部存储 This works great for most purposes, but might not work in every purpose.这适用于大多数用途,但可能不适用于所有用途。 It is private by default.默认情况下它是私有的。
  2. If you have to use external for some reason, you want to encrypt the data.如果出于某种原因必须使用外部,则需要对数据进行加密。 You either want to ask the user for a password, or create a device specific password for each app.您要么要求用户输入密码,要么为每个应用程序创建一个设备特定的密码。 Rather than duplicate work on this front, I'll point you to another question already asked on the subject, Java File Encryption我不会在这方面重复工作,而是向您指出关于该主题的另一个问题, Java 文件加密

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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