鴻蒙OS NotificationConstant

2022-10-11 10:27 更新

NotificationConstant

java.lang.Object

|---ohos.event.notification.NotificationConstant

public final class NotificationConstant
extends Object

提供靜態(tài)常量來指示通知刪除原因。

常量是調(diào)用 NotificationSubscriber#onCanceled(NotificationRequest, NotificationSortingMap, int) 時使用的 int 參數(shù)。

Since:

2

嵌套類摘要

修飾符和類型 描述
static class NotificationConstant.DisturbMode 枚舉免打擾模式的類型。
static class NotificationConstant.InputEditType 枚舉在通知中提供給用戶的選項的編輯類型。
static class NotificationConstant.InputsSource 枚舉用戶輸入源。
static class NotificationConstant.SemanticActionButton 枚舉觸發(fā) NotificationActionButton 時關(guān)聯(lián)的 IntentAgent 將采取的操作。

字段摘要

修飾符和類型 字段 描述
static int APP_CANCEL_ALL_REASON_DELETE 表示由于應(yīng)用程序取消了所有通知而刪除了通知。
static int APP_CANCEL_REASON_DELETE 表示由于應(yīng)用程序取消通知而刪除通知。
static int APP_CANCEL_REASON_OTHER 表示通知因其他原因被刪除。
static int CANCEL_ALL_REASON_DELETE 表示由于用戶清除所有通知而刪除通知。
static int CANCEL_REASON_DELETE 表示通知因用戶清除而被刪除。
static int CLICK_REASON_DELETE 表示通知因為被點擊而被刪除。
static int ERROR_REASON_DELETE 指示由于 UI 錯誤而刪除通知。
static String EXTRA_INPUTS_SOURCE 鍵表示輸入源。
static int PACKAGE_BANNED_REASON_DELETE 表示由于應(yīng)用程序被禁止發(fā)送通知而刪除通知。
static int PACKAGE_CHANGED_REASON_DELETE 表示由于對應(yīng)用程序進行了更改而刪除了通知。
static int USER_STOPPED_REASON_DELETE 指示由于應(yīng)用程序上下文已停止而刪除通知。

方法總結(jié)

從類 java.lang.Object 繼承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

字段詳細信息

APP_CANCEL_ALL_REASON_DELETE

public static final int APP_CANCEL_ALL_REASON_DELETE

表示由于應(yīng)用程序取消了所有通知而刪除了通知。

APP_CANCEL_REASON_DELETE

public static final int APP_CANCEL_REASON_DELETE

表示由于應(yīng)用程序取消通知而刪除通知。

APP_CANCEL_REASON_OTHER

public static final int APP_CANCEL_REASON_OTHER

表示通知因其他原因被刪除。

CANCEL_ALL_REASON_DELETE

public static final int CANCEL_ALL_REASON_DELETE

表示由于用戶清除所有通知而刪除通知。

CANCEL_REASON_DELETE

public static final int CANCEL_REASON_DELETE

表示通知因用戶清除而被刪除。

CLICK_REASON_DELETE

public static final int CLICK_REASON_DELETE

表示通知因為被點擊而被刪除。

ERROR_REASON_DELETE

public static final int ERROR_REASON_DELETE

指示由于 UI 錯誤而刪除通知。

EXTRA_INPUTS_SOURCE

public static final String EXTRA_INPUTS_SOURCE

鍵表示輸入源。

PACKAGE_BANNED_REASON_DELETE

public static final int PACKAGE_BANNED_REASON_DELETE

表示由于應(yīng)用程序被禁止發(fā)送通知而刪除通知。

PACKAGE_CHANGED_REASON_DELETE

public static final int PACKAGE_CHANGED_REASON_DELETE

表示由于對應(yīng)用程序進行了更改而刪除了通知。

USER_STOPPED_REASON_DELETE

public static final int USER_STOPPED_REASON_DELETE

指示由于應(yīng)用程序上下文已停止而刪除通知。

以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號