Ask the Android developers to help me look at this problem:
<activity android:name= ". Secondactivity "Android:label=" This is secondactivity " android:l Aunchmode= "singleinstance" > <intent-filter> <action android:name= "Co M.example2.myapplication2.action_start "/> <category android:name=" Android.intent.category.DEFAULT "/ > <category android:name= "Com.example2.myapplication2.MY_CATEGORY"/> </intent-filte r> </activity> <activity android:name= ". Thirdactivity "> <intent-filter> <action android:name=" Android.intent.action.VIEW "/& Gt <category android:name= "Android.intent.category.DEFAULT"/> <data android:scheme= "http"/> </intent-filter> </activity>
such as: I set the secondactivity inside the boot mode is singleinstance, activity one start activity two, activity two start activity three. Such as:
Activity one inside: Intent Intent = new Intent (firstactivity.this, secondactivity.class); Startactivityforresult (intent,1);//Activity two inside: intent intent = new Intent (secondactivity.this, thirdactivity.class); StartActivity (Intent);
The result is this: 01-28 08:31:47.358 6357-6357/com.example2.myapplication2 d/firstactivity:task ID is 95
01-28 08:32:14.540 6357-6357/com.example2.myapplication2 d/secondactivity:task ID is 95
01-28 08:32:16.524 6357-6357/com.example2.myapplication2 D/thirdactivity:task ID is 96 don't understand why AH??? By reason not should activity two alone in a new stack inside? How to run the three running past. I've tried it. Singinstance that setting to the activity one, that is, three are all in one station. To set the startup mode to activity three, activity three is actually in a new stack when it is built. Is there a problem with my Android studio installation? Ask the expert to answer ....
Help post: Android development in the early days: why I in the activity of the second set of Singinstance mode to run to the activity of three go???