xtrinch / fcm-django

FCM Django: Send push notifications via django to websites, iOS & android mobile devices through FCM (Firebase Cloud Messaging)
http://fcm-django.readthedocs.io/
MIT License
774 stars 195 forks source link

How to set the priority of the notification? #156

Closed prafulbagai closed 3 years ago

xtrinch commented 3 years ago

Use the 'low_priority' prop that you can pass on sending.

hosseinmp76 commented 3 years ago

@xtrinch is 'low_priority' still available? if so can you add a sample in readme or docs? I can't find how to set priority in notif.

xtrinch commented 1 year ago

@hosseinmp76 This basically boils down to how you construct the message, which is best followed by the official firebase-admin docs. An example would be:

message = messaging.Message(
    android=messaging.AndroidConfig(
        priority='normal',
        notification=messaging.AndroidNotification(
            title='test',
            body='test123',
        ),
    ),
)