0

I have 3 Activities. StartupActivity, LoginActivity and PinActivity.

StartupActivity starts PinActivity with startActivity and flag Intent.FLAG_ACTIVITY_REORDER_TO_FRONT

In StartupActivity I have a REST API call which gets successful and LoginActivity is started.

BackStack

StartupActivity -> PinActivity -> LoginActivity

Now LoginActivity starts PinActivity for result with startActvityForResult and flag Intent.FLAG_ACTIVITY_REORDER_TO_FRONT

In this case, PinActivity was already in the back stack and So it is brought to the front. When a user enters the pin and press OK button, I have been setting result using the setResult method and finishing PinActivity, but no result is received in LoginActivity (PinActivity was started from LoginActivity with startActivityForResult).

Mohammed Rampurawala
  • 3,033
  • 2
  • 22
  • 32
  • post your manifest please. – David Wasser Aug 17 '18 at 21:21
  • all activities are with standard launch mode – Mohammed Rampurawala Aug 19 '18 at 03:17
  • I would need to test this myself, but it is possible that `startActivityForResult()` and `FLAG_ACTIVITY_REORDER_TO_FRONT` are incompatible. Your navigation seems a bit strange to me. Why are you doing this like this? Please explain. – David Wasser Aug 19 '18 at 14:01
  • PinActivity is started from many activities however sometimes result is expected and sometimes it is not. – Mohammed Rampurawala Aug 19 '18 at 16:06
  • Thats not really what I meant. The question is why you need to use FLAG_REORDER_TO_FRONT. Why should the Activity already be in the stack. It sounds like this should be an Activity that doesn't linger in the stack. But I don't know your application. – David Wasser Aug 19 '18 at 19:43

0 Answers0