Tracking more than 100 simultaneous geofences with the new Android API

后端 未结 2 911
春和景丽
春和景丽 2020-12-29 00:47

I have around 3500 geographical points of interest in an area of 9000 km^2, and I want my app to run in the background and notify the user whenever he or she is in proximity

2条回答
  •  一个人的身影
    2020-12-29 01:13

    I'd recommend downloading all points to a sqlite db on the device. Then find the closest 99 points with something like this: SQlite Getting nearest locations (with latitude and longitude) and register those points with Android to monitor.

    Then set a "significant change" geofence that you can use to monitor if the user's location has changed enough that when they exit this geofence, you should reload the closest points of interest.

提交回复
热议问题