RequestCode changes along the way
I have a fragment inside a fragment
both fragments are loaded fine, except for one of the fragments, I have the intent of starting a camera with activity for the result
if (photoFile != null) {
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT,
Uri.fromFile(photoFile));
startActivityForResult(takePictureIntent, REQ_TAKE_PHOTO);
}
now my REQ_TAKE_PHOTO is defined like this:
public static final int REQ_TAKE_PHOTO=301;
however, in my onActivityResult, the request code that I get when returning from the camera is 131373 -> not the code I posted with
What can change the code along the way?
note that when the inner snippet (the one in the order for shooting) is fired separately, the code is returned as usual 301
source to share
to make requestCode
it what it was when I started startActivityForResult
I need to do requestCode&0xffff
This seems to be a bug in the Android support library according to this: https://code.google.com/p/android/issues/detail?id=15394
source to share