according to this question we have to provide a different type of icon for notifications in android 5 or later which is fine but how i'm gonna set this new icon on my notification linked question's answer says do something like this
Notification notification = new Notification.Builder(context)
.setAutoCancel(true)
.setContentTitle("My notification")
.setContentText("Look, white in Lollipop, else color!")
.setSmallIcon(getNotificationIcon())
.build();
return notification;
private int getNotificationIcon() {
boolean useWhiteIcon = (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP);
return useWhiteIcon ? R.drawable.icon_silhouette : R.drawable.ic_launcher;
}
but in my case i'm creating my Notification in serverSide Code , so i have no idea what to do or how to do ? , do i have to assign this new icon in server side code or i can do this in my project's inner class ??
if anybody have any clue then guide me
P.S. - if my question is not clear enough then let me know i'll add some more detail