You are calling startActivityForResult() from your Fragment. When you do this, the requestCode is changed by the Activity that owns the Fragment.

If you want to get the correct resultCode in your activity try this:

Change:

startActivityForResult(intent, 1);

To:

getActivity().startActivityForResult(intent, 1);
 

相关文章:

  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
  • 2021-05-03
  • 2022-03-02
  • 2021-06-29
  • 2021-05-23
  • 2022-01-28
猜你喜欢
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案