마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

갤럭시s8 푸시 알림 안옴 진동만 옵니다.

0 추천

fcm 푸시 이벤트를 구현 작업하고 있습니다.

테스트로 여러 디바이스에서 푸시테스트를 하고 있는데

갤럭시 s8+ 오레오 기기에서 진동만 오고 알림 메세지가 나오지를 않습니다.

(s9 시리즈는 없어서 테스트 못해봤어요ㅠ)

 

 

다른기기는 정상적으로 작동 합니다. S6, S7 노트,탭

 

어떤 부분을 건드려야 하는지 알수 있을가요?

 

 Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
 NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
         .setSmallIcon(getApplicationInfo().icon)
         .setContentTitle(title)
         .setContentText(body)
         .setAutoCancel(true)
         .setSound(defaultSoundUri)
         .setVibrate(new long[]{100, 0, 100, 0})
         .setContentIntent(pendingIntent)
         .setDefaults(Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE);

 NotificationManager notificationManager =
         (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);

// notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());
 notificationManager.notify((int) SystemClock.currentThreadTimeMillis(), notificationBuilder.build());

제가 사용한 푸시 코드입니다.

어려버영 (510 포인트) 님이 2018년 5월 16일 질문

1개의 답변

0 추천
오레오 버젼부터 NotificationManager 동작이 변경 되었습니다.

http://gun0912.tistory.com/77
익명사용자 님이 2018년 5월 16일 답변
...