Saving camera data to cache when launched via intent

孤者浪人 提交于 2019-12-23 01:12:54

问题


I am launching the Camera application via an Intent and saving the image temporarily to the SD card using the EXTRA_OUTPUT option. The URI passed needs to point to a location on external storage. I also need to provide a URI if I want the full-size image to be returned.

I would like to account for the fact that the user might not have an SD card mounted.

It is my understanding that due to the security measures Android imposes, the Camera application does not have write permissions to my application's cache folder.

Is there any way around this via some intermediary steps? Or perhaps there is a better approach altogether?

I know that I can use the Camera class to implement my own camera within my application, but I would lose the features the stock Camera application provides.

Thank you!

来源:https://stackoverflow.com/questions/4116649/saving-camera-data-to-cache-when-launched-via-intent

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