久久久久久久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'>

        位置管理器不會刪除位置更新!

        Location manager doesnt remove location updates!(位置管理器不會刪除位置更新!)
          <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. 本文介紹了位置管理器不會刪除位置更新!的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  可能重復:
                  Android:如何取消位置更新請求有意圖嗎?

                  我正在嘗試禁用我之前在其他活動中創建的待處理意圖(廣播),但我無法讓它工作.我讀過我應該重新創建意圖(具有相同的附加功能和所有內容),將其作為參數傳遞,以便我可以實例化pendingIntent,然后將pendingIntent 作為參數傳遞給位置管理器的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
                  

                  <小時>

                  這不起作用,所以我認為這可能與我作為新對象傳入的意圖有關,而與用于創建待處理意圖的意圖不同.


                  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.

                  所以我嘗試在創建它后立即刪除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);
                  

                  <小時>

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


                  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...

                  謝謝

                  麥克

                  推薦答案

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

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

                  這篇關于位置管理器不會刪除位置更新!的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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='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>

                            主站蜘蛛池模板: 麻豆国产一区二区三区四区 | 伊人伊人| 精品视频在线观看 | 羞羞午夜 | 午夜三级在线观看 | 鸡毛片| 国产精品国产精品国产专区不片 | 日韩在线小视频 | 日韩av在线一区 | 91麻豆精品国产91久久久久久久久 | 日本久草| 一区二区三区精品视频 | 久久久精品 | 成人精品毛片国产亚洲av十九禁 | 国产精品成人在线 | 在线观看免费av网 | 亚洲一区二区三区四区五区午夜 | 日本xx视频免费观看 | 91精品国产综合久久精品 | 一级全黄少妇性色生活免费看 | 在线国产一区二区 | 亚欧洲精品在线视频免费观看 | 久久久精品一区二区三区 | 日韩视频精品 | 国产精品久久国产精品 | 精品国产欧美一区二区三区不卡 | 自拍偷拍第一页 | 国产免费色| 久久大陆| 日韩精品一区二区三区在线观看 | 色噜噜狠狠色综合中国 | 国产精品福利网 | 亚洲性视频 | 久久美女视频 | 欧美精品一区三区 | 天天久久 | 黄视频欧美 | 日韩欧美在线一区 | 亚洲顶级毛片 | 国产亚洲精品久久久久动 | 久久lu|