• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Accessing phone GPS coordinates

Sinnie

Lurker
Aug 31, 2021
2
1
Hey all,

I've tried searching around the web on this topic a bit and can't find any definitive answers.

I am looking at building an app which utilises the users location, and most websites I find refer to using geolocation APIs (specifically, Google's: https://developers.google.com/maps/documentation/geolocation/overview).

The pricing for the API seems quite steep, if you have a use case which sees high frequency of use per user. If only 10,000 people make 200 location requests per day, that's $240,000 per month (on the $4 model, which would be lower due to the volumes).

If you wanted an app that provided reasonable accuracy as someone travelled around (such as route tracking for getting across a city), isn't that a huge number of requests to the API? I know there's things to be done to rate limit the number of requests, but still, it seems like you could be left with a huge bill.

I'm sure I'm missing something here, so would be grateful for any information with regard to how best to integrate high volume, regular, location checks without bankrupting yourself!

My understanding is that the phone itself communicates with the GPS satellites and therefore stores the coordinates in the phone. Is that correct? Is it necessary to use a location API if I just want to use the GPS coordinates? I don't need Google maps, or any other service. I literally just want the longtitude and latitude of the phone at any given moment.
 
You should be able to access the phone's location by querying the fused location provider directly on-device. You shouldn't need to run a bunch of queries against a costly web API. (I think; I'm not actually a developer, but I wasn't able to find any sort of pricing or limitations on using the on-device resources.)

https://developer.android.com/training/location/retrieve-current
 
  • Like
Reactions: ocnbrze
Upvote 0
  • Like
Reactions: codesplice
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones