Is it possibile to change the background color for the icon in the notification in the notification drawer on Android if using Parse Push?
I'm talking about the background color for the circle you can take a look at from the image below
Thanks in advance,
Adriano
If you want to change the color of your notification bar, you can download an application called “One shade” from Play Store and follow these steps: Open the One shade app and toggle on > Tap “colors.” Choose “Background color” > Set a color by sliding the bar on the right > Apply.
call setColor -> the color to be used on the background. call setColorized -> the actual call to set the background color. set style to NotificationCompat. DecoratedMediaCustomViewStyle()
1 Tap Notification Settings on the notification panel or tap the Settings app. 2 Tap Notifications. 3 Tap App icon badges.
I think you can use the following method:
ParsePushBroadcastReceiver
getNotification(Context context, Intent intent)
Here's an example of how I did it:
public class PushBroadcastReceiver extends ParsePushBroadcastReceiver {
@Override
protected Notification getNotification(Context context, Intent intent) {
Notification notification = super.getNotification(context, intent);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
notification.color = context.getResources().getColor(R.color.your_background_color);
}
return notification;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With