I see many reasons why an app should behave different if the device is connected to a power supply, via USB cable ore otherwise.
For example, with power on and effectively charging, it could be used as an image viewer, which would be prohibitive if running on battery.
So, how to let an app check if power supply is on, and, if the battery is charging or still running low (due to other power consuming processes or perhaps just because it's old and leaking).
Edit: in view of the comment that points to a method to get noticed of changes of power supply:
This is valuable, maybe for other applications, but I'm asking for actual power supply minus battery need for recharging.