简体   繁体   中英

How to run, test and handle low battery popup

I'm currently developing application on Android Studio. My problem is when application is working and shows low battery popup everything get freeze. I have to minimalize and maximalize back application. I guess there is something wrong with onWindowFocusChanged, onPause or onResume methods.

Anyway, I want to know how to simulate on emulator low battery popup. I don't want to wait one hour for my battery get low. What should i do?

In the three dots button you have controls to change battery status in the emulator:

扩展控件

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM