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

    <bdo id='VHyz9'></bdo><ul id='VHyz9'></ul>

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

      <legend id='VHyz9'><style id='VHyz9'><dir id='VHyz9'><q id='VHyz9'></q></dir></style></legend>

      1. <small id='VHyz9'></small><noframes id='VHyz9'>

        <tfoot id='VHyz9'></tfoot>

        在 Android 中同時使用 GPS 和 Network Provider

        Use GPS and Network Provider at the same time in Android(在 Android 中同時使用 GPS 和 Network Provider)

        <small id='rYWtW'></small><noframes id='rYWtW'>

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

                <legend id='rYWtW'><style id='rYWtW'><dir id='rYWtW'><q id='rYWtW'></q></dir></style></legend>
                  <tbody id='rYWtW'></tbody>
                1. 本文介紹了在 Android 中同時使用 GPS 和 Network Provider的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我在我的應用中實現了一個位置監聽器,它使用了網絡提供者.

                  I have implemented a locationlistener in my app which uses the Network Provider.

                  這一切都很好,因為我想要一個快速的位置,并且使用 GPS 提供程序需要很長時間.

                  This all works fine because i want a location quickly and with GPS Provider it takes ages.

                  但我的應用程序中的位置必須準確(最大 5-10 米).

                  But I've come to a point in my app where location has to be accurate (max 5-10meters).

                  我想知道是否可以同時使用 GPS 提供商和網絡提供商,然后獲得兩者的最佳結果?是否也可以讓我知道 GPS 提供商何時向我提供了 GPS 位置?

                  I was wondering if it's possible to use the GPS provider with the Network Provider at the same time and then get the best result of both? And is it also possible to let me know when the GPS provider provided me with an GPS Location?

                  所以基本上:

                  LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
                  lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this);
                  lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);
                  

                  這是否適用于相同的覆蓋 onLocationChanged() ?

                  Will this work with the same overridden onLocationChanged() ?

                  我如何查看 GPS 是否獲得了位置信息?

                  And how can I see if the GPS has gotten a Location?

                  謝謝,

                  推薦答案

                  你當然可以為多個提供者使用同一個監聽器.最好將 locationmanager.getProvidersCriteria 對象一起使用,然后按準確性排序或只聽所有這些對象.不過實際差別不大.

                  You can certainly use the same listener for multiple providers. It may be better to use locationmanager.getProviders with a Criteria object then sort by accuracy or just listen to all of them. Not much practical difference though.

                  onLocationChanged 回調為您提供一個 Location 對象,該對象有一個 getProvider() 方法,您可以使用它來確定它來自哪里.它還有一個 getAccuracy() 方法,因此您還可以按準確性對最近的修復進行排序.

                  The onLocationChanged callback gives you a Location object, which has a getProvider() method you can use to determine where it came from. It also has a getAccuracy() method, so you could also sort your recent fixes by accuracy.

                  這篇關于在 Android 中同時使用 GPS 和 Network Provider的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 或網絡提供商)
                    <tbody id='nkdlj'></tbody>
                2. <legend id='nkdlj'><style id='nkdlj'><dir id='nkdlj'><q id='nkdlj'></q></dir></style></legend>

                  <small id='nkdlj'></small><noframes id='nkdlj'>

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

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

                            主站蜘蛛池模板: 亚洲视频免费在线播放 | 欧美大片在线观看 | 色综合久久久久 | 中文字幕一区在线观看视频 | 日韩免费高清视频 | 日屁网站 | 亚洲欧美一区二区三区1000 | 国产精品久久久久久久久久免费看 | 男人的天堂中文字幕 | 久久综合一区 | 国产999精品久久久久久 | 久久久一二三 | 99精品99| 97成人精品| 成人久久久久久久久 | 欧美一级在线观看 | 高清成人av | 欧美成人黄色小说 | 国产精品夜间视频香蕉 | 欧美精品欧美精品系列 | 精品视频在线观看 | 欧美精品综合在线 | 国产精品美女久久久久久久久久久 | 久久精品国产一区 | 97国产爽爽爽久久久 | 精品国产伦一区二区三区观看方式 | 国产乱码精品一区二区三区忘忧草 | 日韩中文字幕在线观看视频 | 日韩在线播放av | 亚洲国产成人av好男人在线观看 | 亚洲一区综合 | 岛国午夜 | 伊人中文字幕 | 欧美理论在线观看 | 国产成人精品一区二区三区 | 成人精品在线视频 | 欧美极品一区二区 | 罗宾被扒开腿做同人网站 | 国产一区二区影院 | 7777在线视频免费播放 | 国产免费观看一级国产 |