Does Google offer an API that I can use to get the location of my phone?

℡╲_俬逩灬. 提交于 2019-12-03 12:00:23

问题


My smartphone reports my location to Google (to G+ and to the Android Device Manager). I'd like to read that location from a website/program to plot my location.

I could use another app on my smartphone doing extra tracking but that tends to drain the battery quite a bit (having two apps do the tracking).

Since Latitude was deprecated I can't seem to find a replacement.


回答1:


As part of Android Google is offering a location API. However, it sounds like you are looking for some kind of personal web API where you can get access to the location already sent to Google. I'm quite sure that it doesn't exist and that Google has no plans of reintroduce anything like the old Latitude API.

I don't know what you are trying to achieve, but have a look at Google Account Activity. There you can export your location history manually.




回答2:


I would suggest you look at https://maps.google.com/locationhistory. It offers the option to export this data into a KML file. If you get a little sneaky, you may be able to auth to google services, and get the file directly.




回答3:


Check out using location from Google Play Services: http://developer.android.com/google/play-services/index.html

It'll handle keeping track of the device's location, you just request the current location.



来源:https://stackoverflow.com/questions/19914821/does-google-offer-an-api-that-i-can-use-to-get-the-location-of-my-phone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!