-2

I can not get an app_icon in the notification bar.
I want to set my app icon in notification icon.
How can I do this?

NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context) .setSmallIcon(icon);

I got White icon instand of app icon

1 Answers1

1

I had the same issue, mainly it happens with the issue of not suporting sizes. hope this might help.

Notification noti = new NotificationCompat.Builder(context)
                .setContentTitle("DPD News")
                .setSmallIcon(R.drawable.YOURICON_SMALL) // this is the icon that show in notification are before drage down, small icon. this has to be 25px X 25px
                .setLargeIcon(LARGE_ICON) // i have use the same sizes of ic_launcher to this
                .setContentText("MESSAGE")
                .setContentIntent(pi)  // pending intent if needed
                .setAutoCancel(true)
                .build();