Do I need an api key to get last known location in Android with Google Play Services?

被刻印的时光 ゝ 提交于 2019-12-04 02:41:12

问题


I just recently started learning Android and am working on small projects to learn the essentials I need for to work on a larger project I have coming up. I need to get the users last know location. I went through this tutorial, and it wouldn't connect to play services. Do I need an api key to get the last known location? And also what is the easiest way to implement location awareness in Android?


回答1:


You need not to give any API key to fetch last known Location. API key is needed when integrating Google Maps in Android app. Android Location API using Google Play Services




回答2:


No you don't need api key for last known loacation. You should follow these tutorial of android provided by google. Very easy and efficient Link



来源:https://stackoverflow.com/questions/35033410/do-i-need-an-api-key-to-get-last-known-location-in-android-with-google-play-serv

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