Skip to content Skip to sidebar Skip to footer

Startactivityforresult With Three Activities

I have three activities, let's just call them Activity A, Activity B and Activity C At first I'm at the Activity A and I'm starting a QR scanner (Activity B) with startActivityForR

Solution 1:

This is not how startActivityForResult() is meant to work. You would be better off saving the data in SharedPreferences or somewhere else.

You also could probably use startActivityForResult() to start ActivityC from A then do the same to start B from C (don't finish C yet), passing back the result you want to pass to A. So it would be something like

A --> C --> B (finish) --> C (finish) --> A

using startActivityForResult() to start C and B and returning a result with setResult() to the onActivityResult() of both C and A

Post a Comment for "Startactivityforresult With Three Activities"