Set background color for wearing
I want to set the background color for a wearable notification. The only method I have found is setBackground (bitmap background) NotificationCompat.WearableExtender , but this is for bitmaps only. Is it a good idea to create a bitmap rectangle and use it as the background of my notification? Any help would be appreciated.
source to share
Use NotificationCompat.Builder, in this you can use setColor and add it to NotificationCompat.WearableExtender with .extend () method. eg:
NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
builder.setSmallIcon(R.drawable.ic_launcher);
builder.setContentTitle("Title");
builder.setColor(COLOR HERE);
NotificationCompat.WearableExtender builderExtended = new NotificationCompat.WearableExtender();
builderExtended.extend(builder);
builder.build();
source to share