2

I am working on an android app that will be used by students to register at schools. I want the different school offices to be able to send push notifications to specific students. I implemented the firebase example and were able to send a push notification to a specific device.

When a student registers I can fetch the registration ID and save it so the office knows which ID belongs to the specific student. That is needed to target the correct student, right?

Do I need to write an external program that lets the offices enter those IDs to send push notifications? How would they get their sender IDs? Or is there another way or already established practice for similar use-cases?

As you probably noticed I am a bit confused about that; any help appreciated.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
DevStev
  • 23
  • 2

1 Answers1

1

Question 1: Do I need to write an external program that lets the offices enter those IDs to send push notifications?

Answer: yes, you have to. It depend either you are using firebase console for sending notification or you have your server which will be sending push to firebase server to send it to all. So if you are using your server then you can create a db of student and make queries for their id in different scenario and send a push.

Question 2: is there another way or already established practice for similar use-cases?

Answer :If you gone through the FCM documentation their is a feature for creating a topic and subscribing its push , so either you can create different topic which student can subscribe , so they will get only the relevant notification only, you can follow below link for more information

FCM TOPIC LINK

.

Punit Sharma
  • 2,951
  • 1
  • 20
  • 35
  • Thanks for making that clear to me. Do you know wether the Firebase Server Key changes over time or is it persistent? – DevStev Nov 07 '16 at 12:04