ActivityOptions.SetPendingIntentBackgroundActivityStartMode 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將允許或拒絕發送者啟動背景活動的模式設為 PendingIntent。
[Android.Runtime.Register("setPendingIntentBackgroundActivityStartMode", "(I)Landroid/app/ActivityOptions;", "GetSetPendingIntentBackgroundActivityStartMode_IHandler", ApiSince=34)]
public virtual Android.App.ActivityOptions SetPendingIntentBackgroundActivityStartMode(Android.App.BackgroundActivityStartMode state);
[<Android.Runtime.Register("setPendingIntentBackgroundActivityStartMode", "(I)Landroid/app/ActivityOptions;", "GetSetPendingIntentBackgroundActivityStartMode_IHandler", ApiSince=34)>]
abstract member SetPendingIntentBackgroundActivityStartMode : Android.App.BackgroundActivityStartMode -> Android.App.ActivityOptions
override this.SetPendingIntentBackgroundActivityStartMode : Android.App.BackgroundActivityStartMode -> Android.App.ActivityOptions
參數
傳回
- 屬性
備註
將允許或拒絕發送者啟動背景活動的模式設為 PendingIntent。
這通常用於執行 PendingIntent#send(Context, int, Intent, PendingIntent.OnFinished, Handler, String, Bundle) 或類似方法時。 PendingIntent 的特權發送者應該只有在 PendingIntent 來自受信任來源和/或代表使用者執行時才會授權 #MODE_BACKGROUND_ACTIVITY_START_ALLOWED 。
Java 文件 android.app.ActivityOptions.setPendingIntentBackgroundActivityStartMode(int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。