ActivityOptions.ModeBackgroundActivityStartAllowIfVisible Field

Definition

Caution

This constant will be removed in the future version. Use Android.App.BackgroundActivityStartMode enum directly instead of this field.

Grants the PendingIntent background activity start privileges only when the app has a visible window (i.

[Android.Runtime.Register("MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE", ApiSince=36)]
[System.Obsolete("This constant will be removed in the future version. Use Android.App.BackgroundActivityStartMode enum directly instead of this field.", true)]
public const Android.App.BackgroundActivityStartMode ModeBackgroundActivityStartAllowIfVisible = 4;
[<Android.Runtime.Register("MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE", ApiSince=36)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.App.BackgroundActivityStartMode enum directly instead of this field.", true)>]
val mutable ModeBackgroundActivityStartAllowIfVisible : Android.App.BackgroundActivityStartMode

Field Value

Value = 4
Attributes

Remarks

Grants the PendingIntent background activity start privileges only when the app has a visible window (i.e., is visible to the user). This is the recommended mode for most apps to minimize disruption to the user experience.

For more information on background activity start restrictions, see: Restrictions on starting activities from the background

Java documentation for android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE.

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