English 中文(简体)
安德列:经常如何获得LastKnownLocation(LocationManager)。 NETWORK_PROVIDER)回报在实际生活中无效?
原标题:Android: How often does getLastKnownLocation(LocationManager.NETWORK_PROVIDER) return null in real life?

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 对这一少见案件执行违约地点。 我只想知道这个案件很少。

最佳回答

当残疾人在残疾时,它就不再恢复。 地点和安保;通过网络地点

因此,这种情况经常发生。

问题回答

取决于用户如何经常与互联网连接。

牢房必须翻译到协调处,而且我知道有藏身之处,即便在离已经翻译的牢房外,但就新电线而言,在与互联网没有连接的电话之前,它会赢得对你位置的更新。

无论如何,你总是需要检查地点日期,因为这可能已经过时。 特别是在你用飞机通话和前往世界其他地方之后。

在我的测试中,我发现,它常常是无效的。 没有用户告诉他们,就不会有许多东西消耗全球定位系统。 但是,拉斯特克瑙内斯岛问题在于它可能极其过时。 因此,即使它没有失效,它也可能是时日甚至数天。

It will probably also depend on how often you are polling it. That is, it could get set to null and stay there a while if you re not checking it frequently.

locationManager.requestLocationUpdates(provider, minTime, minDistance, this);

我借用了一个项目,作为地图活动项目的kel子。 在加入“要求登记最新情况”电话之前,它完全放弃了所有的时间(有名供应商)。





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签