TomBomb TomBomb - 10 months ago 114
Android Question

Android - startActivityForResult immediately triggering onActivityResult

I am launching activities from the main activity in my app using the call

startActivityForResult(intent, ACTIVITY_TYPE)
, and they are all working but one.

This one, when called, launches the activity as desired, but in the log I can see that
is immediately being triggered. The activity shows up but
is immediately returned to

I then interact with the activity, press a button which calls
, and
is not called the time (because apparently a result has already been returned).

Does this make sense to anyone? Has anyone seen this behavior before?


You can't use startActivityForResult() if your activity is being launched as a singleInstance or singleTop.