語言

ActivityOptions.ModeBackgroundActivityStartAllowIfVisible 欄位

定義

警告

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

只有當應用程式有可見視窗時,才會 PendingIntent 授予背景活動開始權限(例如。

[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

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於