NotificationManager.Policy 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
NotificationManager.Policy(IntPtr, JniHandleOwnership)
初始化現有 Java 原生介面物件的受管理表示。
protected Policy(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.App.NotificationManager.Policy : nativeint * Android.Runtime.JniHandleOwnership -> Android.App.NotificationManager.Policy
參數
- javaReference
-
IntPtr
nativeint
Java 原生介面物件參考。
- transfer
- JniHandleOwnership
所有權轉移應用於 Java 原生介面物件參考。
備註
當 .NET 為 Android 綁定執行時建立一個受管理的 Java 物件時,會呼叫這個建構子。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders)
建立「請勿打擾」優先模式行為的政策。
[Android.Runtime.Register(".ctor", "(III)V", "", ApiSince=23)]
public Policy(Android.App.NotificationPriorityCategory priorityCategories, Android.App.NotificationPrioritySenders priorityCallSenders, Android.App.NotificationPrioritySenders priorityMessageSenders);
[<Android.Runtime.Register(".ctor", "(III)V", "", ApiSince=23)>]
new Android.App.NotificationManager.Policy : Android.App.NotificationPriorityCategory * Android.App.NotificationPrioritySenders * Android.App.NotificationPrioritySenders -> Android.App.NotificationManager.Policy
參數
- priorityCategories
- NotificationPriorityCategory
能繞過DND通知類別的位元遮罩。
- priorityCallSenders
- NotificationPrioritySenders
哪些來電者可以繞過DND。
- priorityMessageSenders
- NotificationPrioritySenders
哪些訊息發送者可以繞過DND。
- 屬性
備註
建立「請勿打擾」優先模式行為的政策。 針對低於 Build.VERSION_CODES API 等級的應用程式。P 無法更改使用者指定的值來允許或禁止 Policy.PRIORITY_CATEGORY_ALARMS、Policy.PRIORITY_CATEGORY_SYSTEM 和 Policy.PRIORITY_CATEGORY_MEDIA 繞過 dnd。
Android 參考資料。android.app.NotificationManager.Policy.Policy
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders, Int32)
建立「請勿打擾」優先模式行為的政策。
[Android.Runtime.Register(".ctor", "(IIII)V", "", ApiSince=24)]
public Policy(Android.App.NotificationPriorityCategory priorityCategories, Android.App.NotificationPrioritySenders priorityCallSenders, Android.App.NotificationPrioritySenders priorityMessageSenders, int suppressedVisualEffects);
[<Android.Runtime.Register(".ctor", "(IIII)V", "", ApiSince=24)>]
new Android.App.NotificationManager.Policy : Android.App.NotificationPriorityCategory * Android.App.NotificationPrioritySenders * Android.App.NotificationPrioritySenders * int -> Android.App.NotificationManager.Policy
參數
- priorityCategories
- NotificationPriorityCategory
能繞過DND通知類別的位元遮罩。
- priorityCallSenders
- NotificationPrioritySenders
哪些來電者可以繞過DND。
- priorityMessageSenders
- NotificationPrioritySenders
哪些訊息發送者可以繞過DND。
- suppressedVisualEffects
- Int32
哪些視覺中斷應該被DND過濾的通知中抑制。
- 屬性
備註
建立「請勿打擾」優先模式行為的政策。 針對低於 Build.VERSION_CODES API 等級的應用程式。R 無法更改使用者指定的值來允許或禁止繞過 DND,以允許或禁止 Policy.PRIORITY_CATEGORY_CONVERSATIONS。 此外,針對低於 Build.VERSION_CODES API 等級的應用程式。P 只能修改抑制視覺效果場的SUPPRESSED_EFFECT_SCREEN_ON和SUPPRESSED_EFFECT_SCREEN_OFF位元。 其他所有被抑制的效果都會被忽略,並根據螢幕開啟和關閉的數值重新組合。 針對Build.VERSION_CODES的應用程式。P級或以上可設定任何抑制的視覺效果。 然而,若設定了任何抑制效果 > SUPPRESSED_EFFECT_SCREEN_ON,SUPPRESSED_EFFECT_SCREEN_ON與SUPPRESSED_EFFECT_SCREEN_OFF將被忽略,並由更具體的抑制視覺特效部分重新組合。 應用程式應該轉向針對特定效果,而不是過去的SUPPRESSED_EFFECT_SCREEN_ON和SUPPRESSED_EFFECT_SCREEN_OFF效果。
Android 參考資料。android.app.NotificationManager.Policy.Policy
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
NotificationManager.Policy(NotificationPriorityCategory, NotificationPrioritySenders, NotificationPrioritySenders, Int32, Int32)
建立「請勿打擾」優先模式行為的政策。
[Android.Runtime.Register(".ctor", "(IIIII)V", "", ApiSince=30)]
public Policy(Android.App.NotificationPriorityCategory priorityCategories, Android.App.NotificationPrioritySenders priorityCallSenders, Android.App.NotificationPrioritySenders priorityMessageSenders, int suppressedVisualEffects, int priorityConversationSenders);
[<Android.Runtime.Register(".ctor", "(IIIII)V", "", ApiSince=30)>]
new Android.App.NotificationManager.Policy : Android.App.NotificationPriorityCategory * Android.App.NotificationPrioritySenders * Android.App.NotificationPrioritySenders * int * int -> Android.App.NotificationManager.Policy
參數
- priorityCategories
- NotificationPriorityCategory
能繞過DND通知類別的位元遮罩。
- priorityCallSenders
- NotificationPrioritySenders
哪些來電者可以繞過DND。
- priorityMessageSenders
- NotificationPrioritySenders
哪些訊息發送者可以繞過DND。
- suppressedVisualEffects
- Int32
哪些視覺中斷應該被DND過濾的通知中抑制。
- priorityConversationSenders
- Int32
int:價值是以下之一:CONVERSATION_SENDERS_ANYONE CONVERSATION_SENDERS_IMPORTANT CONVERSATION_SENDERS_NONE
- 屬性
備註
建立「請勿打擾」優先模式行為的政策。 針對低於 Build.VERSION_CODES API 等級的應用程式。P 無法更改使用者指定的值來允許或禁止 Policy.PRIORITY_CATEGORY_CONVERSATIONS 繞過 DND。 如果你真的需要更改它們,請使用 AutomaticZenRule 相關的 ZenPolicy,而不是更改全域設定。 針對低於 Build.VERSION_CODES API 等級的應用程式。P 無法更改使用者指定的值來允許或禁止 Policy.PRIORITY_CATEGORY_ALARMS、Policy.PRIORITY_CATEGORY_SYSTEM 和 Policy.PRIORITY_CATEGORY_MEDIA 繞過 dnd。 此外,針對低於 Build.VERSION_CODES API 等級的應用程式。P 只能修改抑制視覺效果場的SUPPRESSED_EFFECT_SCREEN_ON和SUPPRESSED_EFFECT_SCREEN_OFF位元。 其他所有被抑制的效果都會被忽略,並根據螢幕開啟和關閉的數值重新組合。 針對Build.VERSION_CODES的應用程式。P級或以上可設定任何抑制的視覺效果。 然而,若設定了任何抑制效果 > SUPPRESSED_EFFECT_SCREEN_ON,SUPPRESSED_EFFECT_SCREEN_ON與SUPPRESSED_EFFECT_SCREEN_OFF將被忽略,並由更具體的抑制視覺特效部分重新組合。 應用程式應該轉向針對特定效果,而不是過去的SUPPRESSED_EFFECT_SCREEN_ON和SUPPRESSED_EFFECT_SCREEN_OFF效果。
Android 參考資料。android.app.NotificationManager.Policy.Policy
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。