6

I am implementing a service that will push notifications/messages to client devices(android/ios) based on the real time location. If the client is within a predefined radius, the service shall send them a custom message that is tailored towards that location. I am using firebase. The notifications should be sent when the application is active or in the background.

Blacksmith
  • 712
  • 8
  • 21
Mert
  • 83
  • 1
  • 7

2 Answers2

7

There is several aproaches :

  • use fcm topic, but you have to combine with geofencing, whenever user enter or leave certain radius from specific location, it will subscribe or unsubscribe to certain topic

  • use library called geo-fire, with that library you can query all the user that has certain radius from certain specific location. You can combine with cloud function to send center location as parameter

Faruk
  • 5,438
  • 3
  • 30
  • 46
4

Have your app send users location to firebase -> use Cloud Functions to send pushes based on location.

Ivan Wooll
  • 4,145
  • 3
  • 23
  • 34