I added a few more Log.d statements, and after the code
if (resultCode != Activity.RESULT_OK) { - I have:
Log.d(TAG, "(notOK) - onActivityResult.resultCode = " + resultCode);
After rotating the screen twice and pressing back, I see the following in logcat (Two filters):
QuizActivity
onCreate(Bundle) called
onStart() called
onResume() called
onPause() called
onSaveInstanceState
onStop() called
onActivityResult() called
(notOK) - onActivityResult.resultCode = 0
onStart() called
onResume() called
checkAnswer.mIsCheater = false
CheatActivity
onCreate(Bundle) called
onCreate.mIsCheater = false
setAnswerShownResult.mIsCheater = true
onSaveInstanceState
onSaveInstanceState.mIsCheater = true
onCreate(Bundle) called
onCreate.mIsCheater = true
onSaveInstanceState
onSaveInstanceState.mIsCheater = true
onCreate(Bundle) called
onCreate.mIsCheater = true
It looks like the back button does not send resultCode=RESULT_OK, but a zero. I am running:
Android Studio 2.3.1
GenyMotion with Google Nexus 5X API 23.
Is the value of zero correct? Pressing the back (arrow that makes a U turn on right Panel on virtual device). Am I pressing the correct button?
Thank you,
Ken Lee