I'm starting a new Activity from my Fragment with
startActivityForResult(intent, 1);
and want to handle the result in the Fragment's parent Activity:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Log.d(TAG, "onActivityResult, requestCode: " + requestCode + ", resultCode: " + resultCode);
if (requestCode == 1) {
// bla bla bla
}
}
The problem is that I never got the requestCode
I've just posted to startActivityForResult()
.
I got something like 0x40001
, 0x20001
etc. with a random higher bit set. The docs don't say anything about this. Any ideas?