I've a problem with the notification icon in android .
this is my code :
Notification myNotification = new NotificationCompat.Builder(ctx)
.setSmallIcon(getNotificationIcon())
.setAutoCancel(false).setContentTitle(onvan)
.setStyle(new NotificationCompat.BigTextStyle().bigText(msg)).setContentText(msg)
.setContentIntent(pending).build();
long number = (long) Math.floor(Math.random() * 9000000000L) + 1000000000L;
notificationManager.notify((int) number, myNotification);
private int getNotificationIcon() {
boolean useWhiteIcon = (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP);
return useWhiteIcon ? R.drawable.ic_launcher : R.drawable.ic_launcher;
}
What is the problem ?