Reputation: 155
This problem simply puzzles me. I uploaded a new icon for my app, the app's Icon on my phone's dashboard changed. However, the notification Icon remains the same default green floating android, although I declared a different Icon while setting the notification - I also see the correct icon in Android Studio's preview near the line number, but still nothing.
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context,"123")
.setSmallIcon(R.mipmap.ic_launcher_foreground)
.setLargeIcon(BitmapFactory.decodeResource(context.getResources(),
R.mipmap.ic_launcher_foreground))
.setContentTitle("Reminder: "+title)
.setContentText("Go do it TIGER!")
.setPriority(NotificationCompat.PRIORITY_HIGH)
// Set the intent that will fire when the user taps the notification
.setContentIntent(pendingIntent)
.setAutoCancel(true);
Thanks in advance.
Upvotes: 0
Views: 1337
Reputation: 81
Android caches notification channel settings so changing the channel ID int the builder also works. I don't know how to invalidate this cache.
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context,"456")
Upvotes: 0
Reputation: 389
Try to invalidate the cache with :
Android Studio menu -> Files -> invalidate caches / restart
And in your phone uninstall the app
Upvotes: 1