語言

ActivityOptions.ModeBackgroundActivityStartAllowAlways 欄位

定義

警告

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_ALWAYS", 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 ModeBackgroundActivityStartAllowAlways = 3;
[<Android.Runtime.Register("MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS", 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 ModeBackgroundActivityStartAllowAlways : Android.App.BackgroundActivityStartMode

欄位值

Value = 3
屬性

備註

賦予 PendingIntent 所有背景活動啟動權限,包括通常保留給特權上下文(例如伴隨應用程式或擁有 START_ACTIVITIES_FROM_BACKGROUND 權限的權限)。 注意:此模式應謹慎使用。 大多數應用程式應該改用MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE,並依賴通知或前景服務來進行背景互動,以減少使用者干擾。 然而,此模式對於特定使用情境是必要的,例如伴隨應用程式回應連接裝置的提示。 欲了解更多背景活動啟動限制資訊,請參見:從背景啟動活動的限制

Android 參考資料。android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS

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

適用於