솜은 코튼
[error] NotificationChannel 옵션 setVibrationPattern / Push 진동 설정 본문
- Android 26 이상부터는 NotificationChannel을 지정해주지 않으면 노티피케이션 알람이 오지 않는다.
[오류 사항]
NotificationChannel의 옵션인 setVibrationPattern가 동작하지 않는 현상
[해결 방법]
1. 해당 부분을 적용하지 않고 default 값의 진동 패턴을 준다.
2. 2개 이상의 패턴 값을 입력한다.
notificationChannel.setVibrationPattern(new long[]{100, 200});
|
cs |
※ 위와 같이 적용하였을 경우에도 반영이 되지 않는다면 'Clean Project' 후 앱을 재설치하면 된다.