Search code examples
androidbattery

How to judge if the phone is low battery when i enter app more timely


I want to do something when enter app with low battery.I know i can register abroadcastReceiver to get the battery level,but it is not timely.How can i get the battery level more timely?


Solution

  • I have resolved it.The receiver will receive the broadcast when we register it.The broadcast is sticky.