I am creating an application from which I get data from Parse and passing this data to Notification to generate and display it to the user.
But for some reason I canβt show the correct color icon in Marshmallows
On any other version of Android, its work is completely fine, but in Marshmallow its eerie white icon is not the actual one that I choose.
Here is my notification code.
Intent cIntent = new Intent(context, MainActivity.class); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, cIntent, PendingIntent.FLAG_UPDATE_CURRENT); NotificationCompat.Builder builder = new NotificationCompat.Builder(context) .setSmallIcon(R.drawable.ic_launcher) .setContentText(data) .setContentTitle("Notification from Parse") .setContentIntent(pendingIntent); Notification notification = builder.build(); NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); nm.notify(100, notification);
Please help me with this or tell me how to get rid of this problem.
user5340656
source share