But does this not mean that the level will be calculated in the presence of translation?
Moreover, when the battery level changes, a broadcast is sent.
I wanted to know how to find the battery level at this particular moment?
From a technical point of view, you cannot.
What you can do is find out about the last broadcast of ACTION_BATTERY_CHANGED - IOW, the battery level the last time Android told everyone about the battery level:
registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED))
This will return the last Intent broadcast (since broadcasting with the battery will be sticky). BatteryManager.EXTRA_LEVEL and BatteryManager.EXTRA_SCALE are keys to additional features that contain information about the battery level.
source share