How to save a picture to a file?

久未见 提交于 2019-12-05 19:18:05

Try calling getExtras().get("data") and casting the result to a Bitmap.

See here for an example.

On a related note, if you have the "crop" activity come up after taking the picture using intent.putExtra("crop", "true"), you'll get the cropped URI from getExtras().get("action").

I realize you've got this all fixed by now, just want to make sure no one tries to use this with crop and gets confused.

Reference: the apps-for-android LolCat activity.

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