9

On android 10, negative images i.e images with inverted color are displayed in the notification from custom-notification apps when dark mode is enabled.

How to prevent that from happening?

Notification with light theme:

image1

Notification with Dark theme:

image2

Nanda Z
  • 938
  • 6
  • 24
Nik
  • 109
  • 1
  • 5

3 Answers3

1

It turns out this was an android issue, which is fixed after moving to androidx and setting targetsdk to 29 or above. And to add support for dark mode, we can add the desired color to both the files, color.xml(night) and color.xml(not-night).

Nik
  • 109
  • 1
  • 5
0

same issue on HUAWEI EMUI
if your remoteviews's layout xml has TextView Lable and set android:textColor
remove it and try again
i dont know why, but this works for me...

Lewis Weng
  • 292
  • 3
  • 5
0

I had the same issue and was fixed once I updated the targetSdkVersion to 29

targetSdkVersion 29

no need to change the textColor of TextView

Mostafa El-Abady
  • 588
  • 8
  • 25