gpt4 book ai didi

android - 在没有谷歌播放服务的情况下获取位置-android

转载 作者:IT老高 更新时间:2023-10-28 22:22:37 25 4
gpt4 key购买 nike

我知道有些手机没有预装谷歌播放服务。我想问是否有可能在没有 Google Play Services 的情况下获取位置,只需使用 LocationManager。不是 LocationClient。

最佳答案

你可以使用 LocationManager

LocationManager locationManager = (LocationManager) getApplicationContext().getSystemService(LOCATION_SERVICE);

Location location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);

关于android - 在没有谷歌播放服务的情况下获取位置-android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17726728/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com