久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <legend id='t39ha'><style id='t39ha'><dir id='t39ha'><q id='t39ha'></q></dir></style></legend>

        <tfoot id='t39ha'></tfoot>
          <bdo id='t39ha'></bdo><ul id='t39ha'></ul>

        <i id='t39ha'><tr id='t39ha'><dt id='t39ha'><q id='t39ha'><span id='t39ha'><b id='t39ha'><form id='t39ha'><ins id='t39ha'></ins><ul id='t39ha'></ul><sub id='t39ha'></sub></form><legend id='t39ha'></legend><bdo id='t39ha'><pre id='t39ha'><center id='t39ha'></center></pre></bdo></b><th id='t39ha'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='t39ha'><tfoot id='t39ha'></tfoot><dl id='t39ha'><fieldset id='t39ha'></fieldset></dl></div>
      1. <small id='t39ha'></small><noframes id='t39ha'>

        Android:getLastKnownLocation 已過期 - 如何強制刷新位置

        Android: getLastKnownLocation out-of-date - how to force location refresh?(Android:getLastKnownLocation 已過期 - 如何強制刷新位置?)

        • <bdo id='ppISD'></bdo><ul id='ppISD'></ul>
              • <tfoot id='ppISD'></tfoot>
                  <i id='ppISD'><tr id='ppISD'><dt id='ppISD'><q id='ppISD'><span id='ppISD'><b id='ppISD'><form id='ppISD'><ins id='ppISD'></ins><ul id='ppISD'></ul><sub id='ppISD'></sub></form><legend id='ppISD'></legend><bdo id='ppISD'><pre id='ppISD'><center id='ppISD'></center></pre></bdo></b><th id='ppISD'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ppISD'><tfoot id='ppISD'></tfoot><dl id='ppISD'><fieldset id='ppISD'></fieldset></dl></div>
                    <tbody id='ppISD'></tbody>

                  <legend id='ppISD'><style id='ppISD'><dir id='ppISD'><q id='ppISD'></q></dir></style></legend>
                1. <small id='ppISD'></small><noframes id='ppISD'>

                2. 本文介紹了Android:getLastKnownLocation 已過期 - 如何強制刷新位置?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在使用

                  myLocation = mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
                  

                  在我的應用程序啟動時檢索當前位置.

                  to retrieve the current location at the start-up of my application.

                  正如 Android 文檔所述,此位置可能過時",因為該方法返回上次使用 GPS 時的位置.

                  As the Android documentation states, this location can be "out-of-date", since the method returns the location when the GPS was used the last time.

                  我如何主動從 GPS 請求當前位置?我考慮過使用 LocationListener,但這可能有點矯枉過正,因為我只需要一次位置(在我的應用程序開始時).

                  How can I actively request the current location from the GPS? I thought about using LocationListener, however that might be a bit of an overkill, since I only need the location once (at the start of my app).

                  有什么想法嗎?

                  推薦答案

                  你最初的直覺是正確的——你需要使用 LocationListener 來請求更新.鑒于您只需要一個位置,您可以在第一個值返回后取消注冊 LocationListener.

                  Your initial intuition is correct - you need to use a LocationListener to request updates. Given that you require only a single position, you can unregister the LocationListener after the first value returns.

                  不過,在實踐中,多聽一會兒可能是明智之舉.基于位置的服務(尤其是 GPS)在他們第一次得到修復時傾向于跳來跳去".最好的辦法是監聽一定的時間,或一定數量的更新,或者直到達到一定的準確度(位置監聽器將返回所返回位置的準確度).

                  In practice though, it's probably wise to listen for a little bit longer. Location Based Services (particularly GPS) have a tendency to 'jump around' a bit when they first get their fix. Your best bet is to listen for a set amount of time, or a set number of updates, or until a certain level of accuracy has been achieved (the Location Listener will return the accuracy of the position returned).

                  這篇關于Android:getLastKnownLocation 已過期 - 如何強制刷新位置?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Help calculating X and Y from Latitude and Longitude in iPhone(幫助從 iPhone 中的緯度和經度計算 X 和 Y)
                  Get user#39;s current location using GPS(使用 GPS 獲取用戶的當前位置)
                  IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                  How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新一次?)
                  CLLocation returning negative speed(CLLocation 返回負速度)
                  How to detect Location Provider ? GPS or Network Provider(如何檢測位置提供者?GPS 或網絡提供商)
                    <legend id='pnTcJ'><style id='pnTcJ'><dir id='pnTcJ'><q id='pnTcJ'></q></dir></style></legend>
                    <i id='pnTcJ'><tr id='pnTcJ'><dt id='pnTcJ'><q id='pnTcJ'><span id='pnTcJ'><b id='pnTcJ'><form id='pnTcJ'><ins id='pnTcJ'></ins><ul id='pnTcJ'></ul><sub id='pnTcJ'></sub></form><legend id='pnTcJ'></legend><bdo id='pnTcJ'><pre id='pnTcJ'><center id='pnTcJ'></center></pre></bdo></b><th id='pnTcJ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='pnTcJ'><tfoot id='pnTcJ'></tfoot><dl id='pnTcJ'><fieldset id='pnTcJ'></fieldset></dl></div>
                    • <small id='pnTcJ'></small><noframes id='pnTcJ'>

                      1. <tfoot id='pnTcJ'></tfoot>
                          <tbody id='pnTcJ'></tbody>

                            <bdo id='pnTcJ'></bdo><ul id='pnTcJ'></ul>
                          • 主站蜘蛛池模板: 日本在线不卡视频 | 五月婷婷丁香花 | 国产一区福利 | 国产激情久久 | 欧美精品综合 | 欧美色影院 | 亚洲天堂2014| 天天操狠狠干 | 激情五月激情综合网 | 国产日韩精品在线 | 国产午夜三级 | 国产精品高潮呻吟久久 | 放几个免费的毛片出来看 | 亚洲免费观看视频 | 伊人久久久 | 日韩一级在线观看 | 欧美精品99久久久 | 欧美日韩一区在线 | 日韩三级一区二区 | 午夜亚洲精品 | 最新理论片 | 青草在线视频 | 18在线观看网站 | xxxx色 | av香蕉 | 精品少妇一区二区三区免费观 | 亚洲第一免费视频 | 国产亚洲欧美在线 | 一级中国毛片 | 日本在线看片 | 欧美爱爱视频 | www.huangse | 国产传媒视频在线观看 | 午夜精品视频在线 | 波多野结衣在线观看一区二区 | 三级黄色 | 伦一理一级一a一片 | 国产一区在线视频 | 三级中文字幕 | 夜晚福利视频 | 五月天毛片 |