반응형 NotificationManagerCompat1 Android - 시스템 앱 알림 상태 확인 회사에서 작업하다가 찾는데 시간이 좀 걸린 부분이 있어 기억하려고 올리는 글입니다. 그래서 짧습니다. 첫 번째로 시스템 알림의 on/off 여부 확인 코드입니다. val isEnable = NotificationManagerCompat.from(context).areNotificationsEnabled() 위 코드의 isEnable이 true이면 시스템 알림이 켜져있는 상태, false이면 꺼져있는 상태입니다. 단, 안드로이드 버전에 따라 알림 부분이 조금 달라지는데, areNotificationsEnabled()를 보면 /** * Returns whether notifications from the calling package are not blocked. */ public boolean areNoti.. 2023. 10. 25. 이전 1 다음 728x90