Using geofire like geofences

后端 未结 2 837
感动是毒
感动是毒 2020-12-12 05:17

I want to make an app which send a notification when the user enters in an area. I know that exists Geofire, and I would like to use, because i\'m using a Firebase database,

2条回答
  •  心在旅途
    2020-12-12 05:37

    GeoFire is a client-side library that allows you to store geographic locations in the Firebase Realtime Database, and subsequently fire GeoQueries against that data to get locations within a specific range of a certain point.

    It has no built in support for geofencing, but it is possible to build a geofencing app with the library. The most important steps are:

    1. You need to regularly know the location of the phone.
    2. You then need to query your database for fences around your location.

    I'm not sure if GeoFire is the most suitable library available for this (and recommending technology is off-topic on Stack Overflow anyway). But it does seem possible.

提交回复
热议问题