Automatically generates low battery warning in Android

I want to generate a low battery warning programmatically, just as it would with a low battery. Can anyone post a sample code on how to do this .. ACTION_BATTERY_LOW is known. but how to use it ..? I want to generate a low battery warning even if the battery is low.

+3
source share
2 answers

ACTION_BATTERY_LOW - This is a broadcast action of the system, so you can’t generate it for security reasons - at least on a “normal” device

+3
source

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


All Articles