• 레퍼런스
  • 자습서
  • notificationRemoved 이벤트

    notificationRemoved 이벤트는 알림이 사라질 때 발생하는 이벤트입니다.

    구문

    Bot.addListener()를 이용해 이벤트에 대한 리스너를 추가할 수 있습니다. Event.NOTIFICATION_REMOVED를 이용해 이벤트 이름을 전달할 수도 있습니다.

    bot.addListener("notificationRemoved", (sbn, rankingMap, reason) => {});
    // 또는
    bot.addListener(Event.NOTIFICATION_REMOVED, (sbn, rankingMap, reason) => {});

    인자

    sbnandroid.service.notification.StatusBarNotification

    사라진 알림에 관한 정보가 담긴 android.service.notification.StatusBarNotification입니다.

    rankingMapandroid.service.notification.NotificationListenerService.RankingMap

    주의

    해당 인자는 안드로이드 8.0 미만에서 제공되지 않습니다.

    활성 알림의 순위 정보를 담은 Map(android.service.notification.NotificationListenerService.RankingMap)입니다.

    reasonNumber

    주의

    해당 인자는 안드로이드 8.0 미만에서 제공되지 않습니다.

    알림이 사라진 이유를 나타내는 상수입니다. 관련 상수는 다음과 같습니다:

    • REASON_CLICK = 1 (0x00000001)`
    • REASON_CANCEL = 2 (0x00000002)`
    • REASON_CANCEL_ALL = 3 (0x00000003)`
    • REASON_ERROR = 4 (0x00000004)`
    • REASON_PACKAGE_CHANGED = 5 (0x00000005)`
    • REASON_USER_STOPPED = 6 (0x00000006)`
    • REASON_PACKAGE_BANNED = 7 (0x00000007)`
    • REASON_APP_CANCEL = 8 (0x00000008)`
    • REASON_APP_CANCEL_ALL = 9 (0x00000009)`
    • REASON_LISTENER_CANCEL = 10 (0x0000000a)`
    • REASON_LISTENER_CANCEL_ALL = 11 (0x0000000b)`
    • REASON_GROUP_SUMMARY_CANCELED = 12 (0x0000000c)`
    • REASON_GROUP_OPTIMIZATION = 13 (0x0000000d)`
    • REASON_PACKAGE_SUSPENDED = 14 (0x0000000e)`
    • REASON_PROFILE_TURNED_OFF = 15 (0x0000000f)`
    • REASON_UNAUTOBUNDLED = 16 (0x00000010)`
    • REASON_CHANNEL_BANNED = 17 (0x00000011)`
    • REASON_SNOOZED = 18 (0x00000012)`
    • REASON_TIMEOUT = 19 (0x00000013)`
    • REASON_CHANNEL_REMOVED = 20 (0x00000014)`
    • REASON_CLEAR_DATA = 21 (0x00000015)`
    • REASON_ASSISTANT_CANCEL = 22 (0x00000016)`
    • REASON_LOCKDOWN = 23 (0x00000017)`

    앱 호환성

    No

    메신저봇R

    4.0

    채팅 자동응답 봇

    No

    StarLight

    No

    메신저봇R

    4.0

    채팅 자동응답 봇

    No

    StarLight

    No

    메신저봇R

    4.0

    채팅 자동응답 봇

    No

    StarLight

    No

    메신저봇R

    4.0

    채팅 자동응답 봇

    No

    StarLight