Android: Getting image bitmap from third party app (e.g. WhatsApp) via content:// URI

自作多情 提交于 2019-11-29 07:23:05

Ok. I found where was the problem. In my app's initial activity I was storing content URI (Which I got from third party app like WhatsApp or Chrome etc. for e.g. content://com.whatsapp.provider.media/item/61025) in an array and was accessing it from other activity.

That was not correct. I got hint from this answer and I called getContentResolver().openInputStream(uri) right from the app's launcher activity immediately after I get shared contents. And it worked, didn't throw any exception.

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