Partager via


Intent.SetFlags(ActivityFlags) Method

Definition

Set special flags controlling how this intent is handled.

[Android.Runtime.Register("setFlags", "(I)Landroid/content/Intent;", "GetSetFlags_IHandler")]
public virtual Android.Content.Intent SetFlags (Android.Content.ActivityFlags flags);
[<Android.Runtime.Register("setFlags", "(I)Landroid/content/Intent;", "GetSetFlags_IHandler")>]
abstract member SetFlags : Android.Content.ActivityFlags -> Android.Content.Intent
override this.SetFlags : Android.Content.ActivityFlags -> Android.Content.Intent

Parameters

flags
ActivityFlags

The desired flags.

Returns

Returns the same Intent object, for chaining multiple calls into a single statement.

Attributes

Remarks

Set special flags controlling how this intent is handled. Most values here depend on the type of component being executed by the Intent, specifically the FLAG_ACTIVITY_* flags are all for use with Context#startActivity Context.startActivity() and the FLAG_RECEIVER_* flags are all for use with Context#sendBroadcast(Intent) Context.sendBroadcast().

See the Tasks and Back Stack documentation for important information on how some of these options impact the behavior of your application.

Java documentation for android.content.Intent.setFlags(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also