We can see the use of Intent.FLAG_ACTIVITY_NEW_TASK in intent.java
file:
If set, this activity will become the start of a new task on this
     * history stack.  A task (from the activity that started it to
the
     * next task activity) defines an atomic group of activities that
the
     * user can move to.  Tasks can be moved to the foreground and
background;
     * all of the activities inside of a particular task always remain
in
     * the same order.
If you only have one activity for your task, there will be no
difference; If you have more activities, you will see the difference.

thanks!

On 6月22日, 上午6时50分, n179911 <[email protected]> wrote:
> Hi,
>
> What is the meaning of 'addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);' in
> the following code?
>
> Intent  intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(url));
> intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
> context.startActivity(intent);
>
> I don't see any difference with or without that line of code.
>
> Thank you.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to