Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top