Skip to content
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

Use FCM topics to subscribe to a device alerts #26

Open
szimek opened this issue Nov 8, 2016 · 0 comments
Open

Use FCM topics to subscribe to a device alerts #26

szimek opened this issue Nov 8, 2016 · 0 comments

Comments

@szimek
Copy link
Collaborator

szimek commented Nov 8, 2016

We could subscribe to devices in general or to a specific detector on this device (e.g. /devices/:device-id or /devices/:device-id/:detector). This way we can send only one notification and FCM will send it to all subscribed devices.

This info needs to be stored in both FCM and Firebase db, so that we can show state of each subscription.

More info how to subscribe a device to a topic: https://developers.google.com/instance-id/reference/server#create_relationship_maps_for_app_instances (Instance ID is the token we get from Firebase on the client).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant