-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android - problem with custom notification icon + notification icon color on light status bar #290
Comments
My solution #53 (comment) |
@shamank thank you, it solved my first problem :) |
@Nico924 Sorry man, I've not been around these days.
Sadly not :( BTW and just for further use, did you find a solution to this? |
@Nico924 How did you solve your first issue ? thanks |
@shamank unfortunately no :/ However, It appears that you can use colorful icons (at least it worked on my Samsung when I had Android 6 and now with Android 7 as well) so the idea is to use a color that works both on dark and white background haha but I know it does not follow the Android guidelines but who cares ? :p |
closing as resolved |
However while i wrote the two following lines in the values/styles.xml (+ values-v21), it keeps setting the default app application icon if I send a random notification using the firebase console (https://console.firebase.google.com).
<drawable name="notification_big">@drawable/notif_icon</drawable>
<drawable name="notification_icon">@drawable/notif_icon</drawable>
However, if I tell firebase the icon I want through a custom parameter (I tell him to use notif_icon in my case), then it works, the custom icon is displayed.
(same consideration for for the accent color. It works through firebase but not using the colors.xml file in values)
To summarize what I have:
cordova-android 6.2.3
cordova-plugin-firebase 0.1.21
Android version 7.0
In the res/ folder
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="accent">#8B0000</color>
</resources>
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<!-- inherit from the holo theme -->
<style name="AppTheme" parent="android:Theme.Light">
<item name="android:windowDisablePreview">true</item>
</style>
<drawable name="notification_big">@drawable/notif_icon</drawable>
<drawable name="notification_icon">@drawable/notif_icon</drawable>
</resources>
In AndroidManifest
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" />
<item name="android:windowLightStatusBar">true</item>
(from here https://stackoverflow.com/questions/35119021/invert-icon-color-of-status-bar)
So I also created a values-v23/styles.xml file like this
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<!-- inherit from the material theme -->
<style name="AppTheme" parent="android:Theme.Material">
<item name="android:windowDisablePreview">true</item>
<item name="android:windowLightStatusBar">true</item>
</style>
<drawable name="notification_big">@drawable/notif_icon</drawable>
<drawable name="notification_icon">@drawable/notif_icon</drawable>
</resources>
`
Once again, it does nothing. If someone could explain me what I'm doing wrong, it would be very great !
Thank you in advance
The text was updated successfully, but these errors were encountered: