Meaning of parameter values in intent. setFlags Method

Source: Internet
Author: User

Mark, if the Activity D is in Manifest. xml declares that the Task affinity is added. The system first checks whether the Task stack with the same affinity as D exists. If yes, D is pushed to the stack, if it does not exist, a new D's affinity stack will be created to press it. If Task affinity of D is not set by default, it is pushed to stack 1 to a B C D, which is the same as without marking. However, if you try to start an Activity from an abnormal non-activity path, such as starting an Activity from a service or BroadcastReceiver, set intent. Flag. The Activity must exist in the Activity stack, but the stack of the Activity does not exist when the Activity is started by means of the Activity. Therefore, a new Activity stack should be created to store the Activity to be started.

Tag, the stack situation becomes: a B. If this tag is not added, the stack is changed to a B c d B. That is to say, if a tag is set and the target Activity already exists in the stack, the Activity located above the target Activity is destroyed from the stack.


 

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.