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.
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