获得位置,而谷歌播放服务-Android [英] get location without google play services -android
本文介绍了获得位置,而谷歌播放服务-Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道有些手机没有preinstall谷歌游戏服务队。我想问的是有可能的方式来获得位置,而谷歌播放服务,只需使用locationManager。不locationClient。
I know some phones do not preinstall google play sevice. I want to ask is there possible way to get location without google play services , just use locationManager. Not locationClient.
推荐答案
您可以使用LocationManager
you can use LocationManager
LocationManager locationManager = (LocationManager) getApplicationContext().getSystemService(LOCATION_SERVICE);
Location location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
这篇关于获得位置,而谷歌播放服务-Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文