<span id="Label3">Empty Android Task stack, compatible API 9<p>In general, we clean up all the ACTIVITY in a TASK by using intent.setflags (intent.flag_activity_new_task | Intent.flag_activity_clear_task) method, But this method is incompatible with API11 prior to the API version, all of which we need to use another method.</p><pre>Intent.putextra (intent_goto_reg_activity, gotoregactivity);<br>ComponentName cn = Intent.getcomponent ();<br>Intent mainintent = Intentcompat.makerestartactivitytask (cn);<br>Context.startactivity (mainintent);<br>This way, the task stack is restructured, and this API is sometimes used to notification jump to an Activity.<br><strong>Note that the launchmodel= "singletask" of the target activity</strong></pre><p>Empty Android Task stack, compatible API 9</p></span>
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