Is it possible to change the radius of all active geofences to a certain value?

Thanks

Edit: I need this so I can make the radius bigger when activity recognition detects I'm in car.

有帮助吗?

解决方案

You can, but it requires a little work. There is no way to get all of the active geofences via the LocationClient. You would have to keep track of the geofences you have added and then reregister those geofences with larger radiuses. These new geofences will replace the old ones as long as the request ids are the same.

The documentation has sample code on how to persist the geofences you've registered. That'd be a good place to start if you want to do this. Look for the "Define Geofence Storage" section.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top