Can I create password protected folder in Android?

走远了吗. 提交于 2019-11-28 13:12:36
Prabu
  • in android there is not possible but we can hide using "." at prefix
  • otherwise Store important folder or file in internal memory.
  • you can see you package directory following way String dir = getPackageManager().getPackageInfo("com.example.kinkey", 0).applicationInfo.dataDir;

Note: it is visible on windows pc

You can't create such a folder on sdcard. Everything that's saved onto sdcard can be accessed by other applications. If you want to create a folder which is not accessible from outside of your application use Context.getDir() method with mode set to MODE_PRIVATE:

Context ctx = getContext();
File folder = ctx.getDir("NewFolder", Context.MODE_PRIVATE);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!