简体   繁体   中英

Google Maps MVP Android

I'm using Google Maps on my app so I'd like to know a different way to do my goal. My goal is every time user joins a street it should call an api saying hey I'm in, so my question is, what's better use geofencing with this or shall I create a service that makes a call every 5 seconds to the server sending the current position?

It depends on how optimised app you want. You can call geofencing every few secs, you can also make call to server to send current position.

You can also configure GPS to call only when user moved some distance, then for example check using geofencing if street was changed or send it to server. Some tweaks and testing will be required, to limit the calls to server and limit the battery drain

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM