게시판 즐겨찾기
편집
드래그 앤 드롭으로
즐겨찾기 아이콘 위치 수정이 가능합니다.
안드로이드 fcm 푸시 메시지 아이콘 질문있습니다
게시물ID : programmer_22465짧은주소 복사하기
작성자 : 이것더하기
추천 : 0
조회수 : 633회
댓글수 : 3개
등록시간 : 2018/06/23 13:01:56
옵션
  • 본인삭제금지
안녕하세요 

현업으로 웹개발쪽 일을 하고 있는데 

팔짜에도 없는 안드로이드 앱 푸시 작업 중 막히는 부분이 있어 질문드립니다

고객 요청으로 앱 푸시 기능을 추가하고 있는데 기능구현은 완료 하였으나,

안드로이드 상단 알림 아이콘이 무슨짓을 해도 변경이 안되고 있습니다..

구글 파이어베이스 message 추가해서 구현한거라 

manifest 에 애플리케이션 메타값으로
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_stat_ic_notification" />
추가 후
firebasemessagingservice.java 에 

NotificationCompat.Builder notificationCompatBuilder=new NotificationCompat.Builder(this,"123454");

notificationCompatBuilder.setSmallIcon(R.drawable.ic_stat_ic_notification)
.setContentTitle("FCM Push Test")
.setContentText(messageBody)
.setAutoCancel(true)
.setSound(defaultSoundUri)
.setContentIntent(pendingIntent);
notificationCompatBuilder.build();
NotificationManager notificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);

//notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());
notificationManager.notify(123454,notificationCompatBuilder.build());

이렇게 추가된 상태구요.. 하도 안되서 푸시 요청할때 
혹시 해결 방안을 알고 계신분이 있으시면 조언 부탁드립니다 

감사합니다.

꼬릿말 보기
전체 추천리스트 보기
새로운 댓글이 없습니다.
새로운 댓글 확인하기
글쓰기
◀뒤로가기
PC버전
맨위로▲
공지 운영 자료창고 청소년보호