Android - Image picker doesn't work on Kindle Fire?

醉酒当歌 提交于 2020-01-02 04:23:05

问题


I have the following code to display an imagepicker. After user picks an image onActivityResult gets called, to return me the data for the selected image.

On kindle however, I get a resultCode of 0, and data as null. Anyone else has noticed this problem before? This problem happens only on kindle fire.

startActivityForResult(new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI), SELECT_PICTURE);

回答1:


I'm running into this exact same issue. Prior to the recent Kindle Fire update, which happened a few days ago for me, picking images from the gallery worked fine for me. So the most recent Kindle Fire update must have introduced this bug.




回答2:


You can get data back from such calls in two ways: either in the actual intent data, or in Intent.EXTRA_STREAM. If you get something back in EXTRA_STREAM it will be a mediastore content:// URL which you'd use a Cursor to look up.



来源:https://stackoverflow.com/questions/9951006/android-image-picker-doesnt-work-on-kindle-fire

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