How to get FileInputStream for internal memory files in Android ? The file is in my custom folder made in application space

懵懂的女人 提交于 2019-12-04 11:04:38

How to get FileInputStream for file in internal memory in android which is not inside applications default file directory.

You can't, unless the file in question is created using openFileOutput() with MODE_WORLD_READABLE, and that's not a very good idea (since any app can now read that file).

As the file was created by camera activity as a result for startActivityForResult() for MediaStore.ACTION_IMAGE_CAPTURE intent.

The camera activity should be storing the file out on external storage, not internal storage. Use the EXTRA_OUTPUT extra to indicate where the file should go.

So is there any way I can change this permissions ?

Assuming "camera activity" is referring to the one in the Android firmware, you will need to modify the firmware.

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