fcm 수신 시 최 상단 statusbar 와 컨트롤센터? 알림센터? 에 나오는 이미지 추가했습니다.
아이콘 설정 할 때 setColor 메서드를 통해 알림센터에 나오는 아이콘 백그라운드 색도 설정해줬구요.
그런데..
앱이 foreground 에 있을 때에는 제대로 표시됩니다.
백그라운드나 죽은 상태에서는 기본 백그라운드 회색으로 표시됩니다..
- foreground 상태에서의 배경
- background 또는 kill 상태에서의 배경
이렇게 나오네요..
notification 을 만들어주는 소스는 아래와 같구요
Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
android.support.v4.app.NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notification_small)
.setPriority(Notification.PRIORITY_MAX)
.setContentTitle(remoteMessage.getNotification().getTitle().toString())
.setContentText(remoteMessage.getNotification().getBody().toString())
.setAutoCancel(true)
.setColor(ContextCompat.getColor(this, R.color.statusBarColor))
.setSound(defaultSoundUri).setLights(000000255, 500, 2000)
.setVibrate(new long[] {1000, 1000, 1000})
.setContentIntent(pendingIntent);
manifast application 아래에다가
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_notification_small" />
이것도 추가했습니다.
무엇이 문제인가요
도움 주시면 감사하겠습니다.