I am building Notification for my ForegroundService on Android, but my icon is not showing:
return new NotificationCompat.Builder(this, CHANNEL_ID)
.setContentText("Sdílení polohy je aktivní")
.setSmallIcon(R.mipmap.ic_launcher)
.setLargeIcon(BitmapFactory.decodeResource(this.getResources(), R.mipmap.ic_launcher))
.build();
What am I doing wrong?
Create an icon set that only uses white color and put the mipmap folders, on a transparent background.You do not use any color other than white. Icon generator
And use this code for icon tint:
.setSmallIcon(R.mipmap.notification_icon)
.setColor(ContextCompat.getColor(context, R.color.yourColor))