سؤال

Can I Cut The Battery Charging programmatically in Android Devices? Even With Root Access or not?1

هل كانت مفيدة؟

المحلول

You can try to read the information from the PROC file system by parsing the files in the folder

/sys/class/power_supply/battery/

The existing files should include information on whether the device is currently charging or discharging, the current voltage, probably the temperature and probably also the current (amperage). However, most of these files are device-specific and refresh rates can vary from once per second (1Hz) to once per minute.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top