Android的:如何经常做getLastKnownLocation(LocationManager.NETWORK_PROVIDER)返回NULL在现实生活中? [英] Android: How often does getLastKnownLocation(LocationManager.NETWORK_PROVIDER) return null in real life?

查看:252
本文介绍了Android的:如何经常做getLastKnownLocation(LocationManager.NETWORK_PROVIDER)返回NULL在现实生活中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

执行Android用户有机会重置NetworkProvider,因此该位置将为空? 我想出了主意,认为其只可能有位置空,启动设备的第一时间之后。但也比谷歌将检查的位置的时候了我的意见。

Do the Android users have the chance to reset the NetworkProvider, so that the location will be null? I came up with the idea, that its only possible to have that location null, after starting the device the very first time. But also than google will check the location right away for my opinion.

当然,我采取了这种罕见的情况下,默认位置。我只是想知道这是怎么回事很少。

Sure, I'm implementing a default location for this rare case. I just want to know how seldom this case is.

推荐答案

它返回'零',当服务被禁用的设置>位置和安全>通过网络位置

It returns 'null', when the Service is disabled in Settings > Location and Security > location through network

这样就可以经常发生的。

So that can happen quite often.

这篇关于Android的:如何经常做getLastKnownLocation(LocationManager.NETWORK_PROVIDER)返回NULL在现实生活中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆