Settings of push notifications via Firebase Cloud Messaging (No sound, led light, badge, vibration)

ios
android

#1

Hello everyone!
I am developing a nativescript application using nativescript-push-notifications that pushes notificatons via Firebase Cloud Messaging. After reviewing the documentation for this package I only found the settings of badge, sound and alert for ios, for android there are none. I would really appreciate any help on this topic.

Moreover, I receive notifications both on ios and android but they are not like native mobile notifications in other apps since
The notification are received without any sound or vibration.
In addition on android - led light will not starts flickering to notify despite all my efforts (same as for example when you receive a text msg in whatsapp/messenger and the led flickers in any color you set it to)
also, i need to add badge on the app’s icon that shows amount -of notifications (or messages) on IOS and Android platforms - any suggestions?

Thanks in advance.


NativeScript push notifications: Android, ios settings
#2

If we talk about iOS, the OS takes full control over the style and behavior of notification and expects you to just set the data attributes in the notification payload.

Where in Android, it lets you take full control and design notification the way you want it. If you like your application to inherit your device’s default sound and vibration settings, set the sound key in notification payload to default.


#3

Thanks for answer.
But how can I do it on Android from code?
What do I need to write?


#4

If you want to customize notification from code, you will have to design and trigger notification from the message received callback. The link below will be a good start.


#5

I checked this topic. And I saw that there use other plugin ‘’nativescript-plugin-firebase".
So can I solve my problem with ‘’nativescript-push-notifications".

Updated: I checked this plugin (nativescript-plugin-firebase). And it is not worked at all. i receive the message from other user, but notification do not arrives. Instead of nativescript-push-notifications that there were notifications without sound, led light, vibration and badge counter on app icon.