In this case, there is a main interface mainactivity, which contains two buttons: mbutton1, mbutton2. press next to jump to activity1 and activity2. there is a button in activity1 mbutton3, jump to activity3, respectively, the redirection method with return values is used. Set the buttons in activity3. if certain conditions are met, the system will jump to activity1 and send the information to activity1. the jump from activity1 to activity3 is good! In activity3, jump toCodeFragment:
Clickok = true; intent backintent = new intent (activity3.this, activity1.class); bundle = new bundle (); bundle. putstring ("send", f0.getabsolutepath (); backintent. putextras (bundle); activity3.this. setresult (0, backintent); activity3.this. finish ();
Later, I developed activity2, which was careless and bound to activity3 .(Note:When returned in activity3, it is associated with activity1 .)However, when activity2 is associated with activity3 and activity3 meets the trigger condition, activity2 is returned normally. That's strange!
In activity3, intent settings are returned, which are redirected to activity1. Now I am wondering, how can activity3 jump to activity2 after activity2 and activity3 establish an intent jump relationship ???
The source code will be provided in the near future. You are welcome to discuss and test it.