I am building a media player app based on Google's Universal Media Player. Now I'm facing a problem with notification the player creates.
Codes to create notification:
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(mService);
notificationBuilder
.setStyle(new NotificationCompat.MediaStyle()
.setShowActionsInCompactView(
new int[]{playPauseButtonPosition}) // show only play/pause in compact view
.setMediaSession(mSessionToken))
.setColor(mNotificationColor)
.setSmallIcon(R.drawable.ic_notification)
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setUsesChronometer(true)
.setContentIntent(createContentIntent(description))
.setContentTitle(description.getTitle())
.setContentText(description.getSubtitle())
.setLargeIcon(art);
This code makes the following notification:
After that I remove .setColor(mNotificationColor) portion from the code. I thought it makes the background of the notification white. But now the background turns to grey like this:
So now I want to set background color to white, this is easy part. setColor
can do the job, but at that time I want the text color black. Cannot figure out how to change the text color. The icons of play/pause is also not changed even I supply black icons.