语言

ActivityOptions.ModeBackgroundActivityStartAllowIfVisible 字段

定义

注意

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

PendingIntent仅当应用具有可见窗口(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

字段值

Value = 4
特性

注解

仅当应用具有可见窗口(即对用户可见)时,才授予 PendingIntent 后台活动启动权限。 这是大多数应用的建议模式,可以最大程度地减少用户体验中断。 有关后台活动启动限制的详细信息,请参阅:对从后台启动活动的限制

Android 参考。android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于