Android: Gallery intent returning resultCode == RESULT_CANCELED

末鹿安然 提交于 2019-12-03 14:35:16
DecodeGnome

OK so I solved this. My problem turned out to be that the onActivityResult() method was being called before the Gallery Intent had finished. I found the sollution here: onActivityResult() called prematurely

Basically, I had specified the activity to be "singleTask" in the manifest. Changing it to "singleTop" solved it for me.

That saved my life! \0/

android:launchMode="singleTop"

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