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???

Source: Internet
Author: User

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???

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.