K
K
KnightForce2017-09-10 16:28:23
Android
KnightForce, 2017-09-10 16:28:23

React Native Android Firebase. How to set an icon for notifications?

I'm using React-NAtive-FCM.
It is necessary that notifications on smartphones above API 22 have an icon. Now there is a white dot in a gray circle.
On smartphones with Android 4.x, the app icon is used.
Lowering targetApi in gradle to less than 22 works, but then other libraries don't work as they should.
Prescribed the default icon in the manifest - does not work, it turns out to change only the color (from gray).
If you send the icon field, as in the guide on the site, it does not work.
How to set the desired icon without changing the targetApi?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Myvrenik, 2017-09-10
@gim0

It's not just a white dot in a white circle, it's the same app icon with a filter applied. The notification icon in new versions should be one-color in accordance with the guidelines. I advise you to push the data through Firebase and create a notification yourself, instead of using their notification features, this way you will have much more control over notifications and you can set a different icon using the setSmallIcon method in the builder (look for the appropriate tools for these your reacts)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question