久久久久久久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>
                          • 主站蜘蛛池模板: 毛片久久久 | 国产丝袜一区二区三区免费视频 | 国产一区二区日韩 | 中文在线视频观看 | 中文字幕在线观看日韩 | 日韩av免费在线电影 | 色播av| 欧美精品一区二区三区四区五区 | 成人激情视频 | 欧美在线精品一区 | 国产精品一区二区三区四区 | 亚洲成人av | 91精品国产欧美一区二区成人 | 黄在线免费观看 | 在线看国产 | 天天操天天干天天爽 | 免费的av| 国内自拍偷拍一区 | 久久99精品久久久久久国产越南 | 国产高清一区二区三区 | 欧美成人一区二免费视频软件 | 99精品久久久久久中文字幕 | 一区二区免费看 | 综合久久99 | 欧美精品1区2区 | 在线只有精品 | 一区二区在线不卡 | 亚洲成人精品 | 欧美精品一区在线发布 | 9191在线播放 | 国产精品免费观看 | 欧美日韩一区在线播放 | 亚洲精品二三区 | 亚洲一区二区视频 | 久久99精品久久久久久国产越南 | 天堂久久av| 永久免费在线观看 | 欧美一区二区三区在线观看 | www.久久 | 久久9久 | 99久久久久|