久久久久久久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的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我在我的應(yīng)用中實現(xiàn)了一個位置監(jiān)聽器,它使用了網(wǎng)絡(luò)提供者.

                  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.

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

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

                  我想知道是否可以同時使用 GPS 提供商和網(wǎng)絡(luò)提供商,然后獲得兩者的最佳結(jié)果?是否也可以讓我知道 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?

                  謝謝,

                  推薦答案

                  你當然可以為多個提供者使用同一個監(jiān)聽器.最好將 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 回調(diào)為您提供一個 Location 對象,該對象有一個 getProvider() 方法,您可以使用它來確定它來自哪里.它還有一個 getAccuracy() 方法,因此您還可以按準確性對最近的修復(fù)進行排序.

                  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.

                  這篇關(guān)于在 Android 中同時使用 GPS 和 Network Provider的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Help calculating X and Y from Latitude and Longitude in iPhone(幫助從 iPhone 中的緯度和經(jīng)度計算 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 或網(wǎng)絡(luò)提供商)
                    <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>

                            主站蜘蛛池模板: 欧美日韩亚洲国产综合 | 国产精品久久久爽爽爽麻豆色哟哟 | 亚洲国产精品久久久 | 精品区一区二区 | 高清亚洲| 91在线一区 | 日韩在线观看一区 | 午夜一区| 欧美a区| 91一区二区三区 | 国产99免费视频 | 在线视频h | 成人片免费看 | 综合久久久 | 国产精品高潮呻吟久久av野狼 | 成人av一区二区在线观看 | 婷婷综合色 | 九久久| 久在线视频播放免费视频 | 91精品久久久久久综合五月天 | 日韩精品免费在线 | 日韩二三区 | 国产精品五月天 | 久久99国产精一区二区三区 | 特黄级国产片 | av网站免费在线观看 | 91精品国产一区二区三区蜜臀 | 国产精品久久久久久久久久久久久 | 五月天婷婷丁香 | 国产高清视频在线观看 | 成人高清在线视频 | 欧美一区二区三区视频在线观看 | 欧美bondage紧缚视频 | 日日操夜夜操视频 | 成人自拍视频 | 久草在线在线精品观看 | 国产欧美日韩综合精品一 | 九色网址| 久久不卡 | 中文字幕爱爱视频 | 亚洲一二三区在线观看 |