語言

Service.StopForegroundDetach 欄位

定義

警告

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

選取器 #stopForeground(int):如果設定,先前提供的 #startForeground 通知將會與服務的生命週期中斷連結。

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

欄位值

Value = 2
屬性

備註

stopForeground(int) 選擇器:若設定為 startForeground(int, Notification) 的通知將從服務生命週期中分離。 即使服務被停止並銷毀,通知仍會持續顯示。

Android 參考資料。android.app.Service.STOP_FOREGROUND_DETACH

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

適用於