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

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

<legend id='8812D'><style id='8812D'><dir id='8812D'><q id='8812D'></q></dir></style></legend>
    <bdo id='8812D'></bdo><ul id='8812D'></ul>

      <small id='8812D'></small><noframes id='8812D'>

      1. 在 Android 上,如何檢測顯示系統對話框(電源選項

        On Android, how to detect a system dialog is displayed (power options, recent apps, low battery...)?(在 Android 上,如何檢測顯示系統對話框(電源選項、最近的應用程序、低電量...)?) - IT屋-程序員軟件開發技術

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

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

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

                  <tfoot id='vBNqm'></tfoot>

                • 本文介紹了在 Android 上,如何檢測顯示系統對話框(電源選項、最近的應用程序、低電量...)?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我想捕捉任何導致我的活動顯示甚至部分隱藏的東西,例如電源選項、最近的應用程序托盤、低電量通知等...我很難檢測到這些系統事件.

                  I'd like to catch anything that causes the display of my Activity to get even partially hidden, e.g. power options, recent apps tray, low battery notification, etc... and I'm having a hard time to detect these system events.

                  我很確定當此類事件發生時會調用 onPause(),但它似乎是錯誤的......還是我?

                  I was pretty sure onPause() would be called when such events happen, but it seems to be wrong... or is it me?

                  還有其他想法嗎?...我最好不要單獨掛鉤每個系統廣播操作,因為我希望盡可能通用(并對隱藏我的 Activity 的任何事情做出反應).

                  Any other idea?... I'd preferably not hook on each system broadcast action individually, since I'd like to be as generic as possible (and react to ANYTHING that hides my Activity).

                  推薦答案

                  在開發一個 kiosk 風格的應用程序時,我知道一些 Dialogs 會出現在前臺并且可以被檢測到

                  On working on a kiosk style app I know that some Dialogs come to the foreground and can be detected by

                      ActivityManager activityManager = (ActivityManager)getBaseContext()
                         .getSystemService(Activity.ACTIVITY_SERVICE);
                      String className = activityManager.getRunningTasks(1).get(0).topActivity.getClassName();
                  

                  一個例子是藍牙綁定對話框,它將 com.android.settings 帶到前臺.

                  An example for that is the bluetooth-binding dialog that brings the com.android.settings to the foreground.

                  一個反例是沒有出現在前臺的電源按鈕對話框(關閉、重啟等).

                  A counter-example is the power-button dialog (Turn off, Reboot etc) that does not come to the foreground.

                  請注意,您可以使用此廣播關閉系統對話框(甚至是電源按鈕對話框):

                  Note that you can close system dialogs (even the power-button dialog) with this broadcast:

                      Intent closeDialog = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
                          sendBroadcast(closeDialog);
                  

                  但在大多數(所有較新的?)設備上,此廣播甚至會關閉軟件鍵盤,因此不建議運行頻繁發送它的服務,因為用戶將無法在文本字段中輸入任何內容.

                  But on most (all newer?) devices this Broadcast will even close the software keyboard, so it is not advisable to have a service running that frequently sends it as the user will then be unable to enter anything into a text field.

                  請注意,此類行為肯定會使您的應用程序成為惡意軟件,使其無法在 google play 上發布.

                  Note that such behaviour will definetly gratify your app a status as beeing malware, keeping it from beeing published on google play.

                  這篇關于在 Android 上,如何檢測顯示系統對話框(電源選項、最近的應用程序、低電量...)?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  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 有多可靠,多久更新一次?)
                  How to detect Location Provider ? GPS or Network Provider(如何檢測位置提供者?GPS 或網絡提供商)
                  Get current location during app launch(在應用啟動期間獲取當前位置)
                  locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)

                    <legend id='12i70'><style id='12i70'><dir id='12i70'><q id='12i70'></q></dir></style></legend>

                    <small id='12i70'></small><noframes id='12i70'>

                        <bdo id='12i70'></bdo><ul id='12i70'></ul>
                          <tbody id='12i70'></tbody>
                        • <i id='12i70'><tr id='12i70'><dt id='12i70'><q id='12i70'><span id='12i70'><b id='12i70'><form id='12i70'><ins id='12i70'></ins><ul id='12i70'></ul><sub id='12i70'></sub></form><legend id='12i70'></legend><bdo id='12i70'><pre id='12i70'><center id='12i70'></center></pre></bdo></b><th id='12i70'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='12i70'><tfoot id='12i70'></tfoot><dl id='12i70'><fieldset id='12i70'></fieldset></dl></div>
                          • <tfoot id='12i70'></tfoot>
                            主站蜘蛛池模板: 久久久亚洲一区 | 久久亚洲春色中文字幕久久久 | 欧美三级在线 | 老司机久久 | 亚洲精品福利视频 | 理伦毛片 | 精品一二三 | 人人人干 | а天堂中文最新一区二区三区 | 午夜影院视频在线观看 | 中文字幕亚洲视频 | 天天夜夜人人 | 久久一视频 | 欧美黄色精品 | 成人国产在线视频 | 国产人成在线观看 | 日韩精品一区二区三区在线 | av一级一片 | 日韩日韩日韩日韩日韩日韩日韩 | 精品视频一区二区三区在线观看 | 在线男人天堂 | 91视频大全 | 国产99视频精品免费播放照片 | 久久蜜桃av一区二区天堂 | 亚洲精品久久久 | 欧美mv日韩mv国产网站91进入 | 欧美一区二区三区在线看 | 午夜国产 | 亚洲精品久久久久久一区二区 | 麻豆久久久 | 亚洲美女天堂网 | 色视频在线播放 | 一级中国毛片 | 国产精品精品久久久 | 日本欧美视频 | 亚洲网一区 | 亚洲免费av一区 | 色站综合 | 2019精品手机国产品在线 | 91在线一区 | 在线免费看黄 |