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

    1. <legend id='QQaDv'><style id='QQaDv'><dir id='QQaDv'><q id='QQaDv'></q></dir></style></legend>

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

        位置管理器不會(huì)刪除位置更新!

        Location manager doesnt remove location updates!(位置管理器不會(huì)刪除位置更新!)
          <tbody id='EUCCp'></tbody>
      3. <i id='EUCCp'><tr id='EUCCp'><dt id='EUCCp'><q id='EUCCp'><span id='EUCCp'><b id='EUCCp'><form id='EUCCp'><ins id='EUCCp'></ins><ul id='EUCCp'></ul><sub id='EUCCp'></sub></form><legend id='EUCCp'></legend><bdo id='EUCCp'><pre id='EUCCp'><center id='EUCCp'></center></pre></bdo></b><th id='EUCCp'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='EUCCp'><tfoot id='EUCCp'></tfoot><dl id='EUCCp'><fieldset id='EUCCp'></fieldset></dl></div>

          <tfoot id='EUCCp'></tfoot>

              • <bdo id='EUCCp'></bdo><ul id='EUCCp'></ul>

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

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

                1. 本文介紹了位置管理器不會(huì)刪除位置更新!的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  可能重復(fù):
                  Android:如何取消位置更新請(qǐng)求有意圖嗎?

                  我正在嘗試禁用我之前在其他活動(dòng)中創(chuàng)建的待處理意圖(廣播),但我無法讓它工作.我讀過我應(yīng)該重新創(chuàng)建意圖(具有相同的附加功能和所有內(nèi)容),將其作為參數(shù)傳遞,以便我可以實(shí)例化pendingIntent,然后將pendingIntent 作為參數(shù)傳遞給位置管理器的removeUpdates 方法.

                  I am trying to disable a pending intent(broadcast) which I have previously created in a different activity but I can't get it to work. I've read that I should recreate the intent(with the same extras and everything), pass it as a parameter so that I can instantiate the pendingIntent and then pass the pendingIntent as a parameter to the location managers removeUpdates method.

                  換句話說:

                  Bundle extra = new Bundle();
                  
                  extra.putString("name", extras.getString("poiName")); //create same extras
                  
                  extra.putInt("id", extras.getInt("rowId")); //create same extras
                  
                  Intent intent = new Intent(PROX_ALERT_INTENT);  
                  
                  intent.putExtra(PROX_ALERT_INTENT, extra);  //put same extras in the intent
                  
                  PendingIntent proximityIntent = PendingIntent.getBroadcast(this.getApplicationContext(),extras.getInt("rowId") , intent, PendingIntent.FLAG_UPDATE_CURRENT);  //pass in the intent
                  
                  LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
                                                                 locationManager.removeUpdates(proximityIntent);  //remove pendingIntent
                  

                  <小時(shí)>

                  這不起作用,所以我認(rèn)為這可能與我作為新對(duì)象傳入的意圖有關(guān),而與用于創(chuàng)建待處理意圖的意圖不同.


                  That didn't work so I thought that it might have to do with the intent that im passing in being a new object and not the same with the one used in order to create the pending intent.

                  所以我嘗試在創(chuàng)建它后立即刪除pendingIntent,但也沒有用:

                  So I tried removing the pendingIntent right after I create it but that didnt work either:

                  Bundle extras = new Bundle();
                  
                      extras.putString("name", poiName);
                  
                      extras.putInt("id", requestCode);
                  
                      Intent intent = new Intent(PROX_ALERT_INTENT);
                  
                      intent.putExtra(PROX_ALERT_INTENT, extras);
                  
                      PendingIntent proximityIntent = PendingIntent.getBroadcast(this.getApplicationContext(), requestCode , intent, PendingIntent.FLAG_CANCEL_CURRENT);
                  
                      locationManager.addProximityAlert(
                          latitude, // the latitude of the central point of the alert region
                          longitude, // the longitude of the central point of the alert region
                          POINT_RADIUS, // the radius of the central point of the alert region, in meters
                          PROX_ALERT_EXPIRATION, // time for this proximity alert, in milliseconds, or -1 to indicate no expiration 
                          proximityIntent // will be used to generate an Intent to fire when entry to or exit from the alert region is detected
                     );
                      locationManager.removeUpdates(proximityIntent);
                  

                  <小時(shí)>

                  你能幫我嗎???從周三開始就一直在竊聽...希望我有更多的聲譽(yù)可以在這個(gè)上設(shè)置一個(gè)邊界...


                  Can you please help me with that??? Its been bugging be since wednesday...wish i had more reputation to put a boundy on this one...

                  謝謝

                  麥克

                  推薦答案

                  通過重新創(chuàng)建 Intent 然后在待處理的 Intent 上調(diào)用 .cancel() 來解決它...

                  Resolved it by recreating the intent and then calling .cancel() on the pending intent...

                  這篇關(guān)于位置管理器不會(huì)刪除位置更新!的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Help calculating X and Y from Latitude and Longitude in iPhone(幫助從 iPhone 中的緯度和經(jīng)度計(jì)算 X 和 Y)
                  Get user#39;s current location using GPS(使用 GPS 獲取用戶的當(dāng)前位置)
                  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 返回負(fù)速度)
                  How to detect Location Provider ? GPS or Network Provider(如何檢測位置提供者?GPS 或網(wǎng)絡(luò)提供商)
                    <tbody id='8cqcx'></tbody>
                    <bdo id='8cqcx'></bdo><ul id='8cqcx'></ul>

                      <small id='8cqcx'></small><noframes id='8cqcx'>

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

                          <legend id='8cqcx'><style id='8cqcx'><dir id='8cqcx'><q id='8cqcx'></q></dir></style></legend>
                          <tfoot id='8cqcx'></tfoot>

                            主站蜘蛛池模板: 久久精品二区 | 久久99精品国产 | 久久精品国产一区二区三区 | 欧美一区二区三区在线 | 色综合中文 | 盗摄精品av一区二区三区 | av黄色免费在线观看 | 日本一区二区三区在线观看 | 欧美精品久久久久久久久老牛影院 | 国产精品久久亚洲7777 | 国产成人影院 | 成人免费看片又大又黄 | 国产欧美视频一区二区三区 | 国产9 9在线 | 中文 | 91九色在线观看 | 日韩精品 电影一区 亚洲 | 国产一区二区 | 99在线视频观看 | 国产精产国品一二三产区视频 | 国产日韩精品在线 | 国产成人在线视频免费观看 | 精品乱码一区二区 | 神马久久av| 日本天堂视频在线观看 | 欧美在线观看一区 | 欧美伊人久久久久久久久影院 | 国产高清一区二区 | 91精品国产综合久久婷婷香蕉 | 97伦理 | 亚洲激情综合 | 国产区精品在线观看 | 国产欧美日韩精品在线观看 | 一区二区久久精品 | 国产激情91久久精品导航 | 麻豆av网| 久久久91精品国产一区二区三区 | 国产一区二区三区在线免费观看 | 一区二区三区在线 | 91国在线视频| 日本天天操 | 精品国产乱码久久久久久88av |