onActivityResult executing twice

那年仲夏 提交于 2019-12-01 07:31:44

You should try calling this in onResume() instead of onCreate();

Intent createProfile = new Intent(this, CreatePreacherActivity.class);
startActivityForResult(createProfile, 1);

Here, it say "You will receive this call immediately before onResume() when your activity is re-starting." I beleive that the first call of onActivityResult() with result code "0" is triggered when your first activity try to resume.

Remove

super.onActivityResult(requestCode, resultCode, data);

from your activity's onActivityResult method.

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