【发布时间】:2018-05-11 17:25:59
【问题描述】:
我正在开发基于位置的应用程序。我正在使用LocationUpdatesForegroundService 示例代码。
哪个是Service 以获取位置详细信息
在某些情况下,位置没有得到。
喜欢。
GPS 和互联网已开启,我正在获取详细位置信息。
但是,
GPS 和 Internet 处于离线状态我无法获取位置详细信息。
案例:
启动应用程序我开始为获取位置提供服务,但 gps 关闭案例在我 gps 开启后首先提示请 gps 开启。
但没有得到 LOCATION mFusedLocationClient.getLastLocation 方法 task.getResult() 是 null。
请解决我的问题。
谢谢
注意: 此代码适用于 MOTO E os 版本 4.4.4。 但不能在 LAVA a97 os 6.0 版中运行
我正在使用这个示例:- https://github.com/googlesamples/android-play-location/tree/master/LocationUpdatesForegroundService
【问题讨论】:
-
得到了同样的...遵循所有的教程,但总是得到空
标签: android gps location google-play-services android-fusedlocation