Battery Notification

Can we get a notification if the phone’s battery starts charging? Regardless of whether the power source is a charger or a USB cable.

+2
source share
1 answer

You can listen to the ACTION_BATTERY_CHANGED broadcast and check the power details with BATTERY_PLUGGED_ [AC / USB] (Check the data here ).

+3
source

Source: https://habr.com/ru/post/1482629/


All Articles