ben-xD / push

Push notifications in Flutter without firebase_messaging.
https://pub.dev/packages/push
37 stars 23 forks source link

Subscribing to topics #40

Open DmitriyBobrovskiy opened 1 year ago

DmitriyBobrovskiy commented 1 year ago

Hey, thanks for the great work. I quite don't understand - is that possible to subscribe to topics? Or that is an FCM specific feature?

What I'm looking for is ability to subscribe to some topic and then sending notifications to each device subscribed to that topic like:

default_app = firebase_admin.initialize_app()

# Create a message
message = messaging.Message(
    notification=messaging.Notification(
        title="Title of the Notification",
        body="Body of the Notification",
        # image="https://kldscope.eu/favicon.png"

    ),
    topic="some_topic"
)

# Send the message
response = messaging.send(message)