I understand there are two different flags and they represent whether the device is plugged into AC or USB charging. How does the device know that, and what does it report to the operating system?
I would have thought the OS could not distinguish between the phone plugged into the USB port of a laptop and charging at 500 mA, vs. the phone plugged into a wall charger and charging at 500 mA.
Perhaps the difference is the current the device is charging at? (If so, what is the minimum current for 'AC'? Is the device free to define the cutoff?)
Or is the difference that the device can also communicate data over its cable? That seems like a strange way to distinguish the two.
https://developer.android.com/reference/android/os/BatteryManager
Thanks in advance!
a common AC
charger-adapter has no USB
host-controller available (unidirectional), contrary to a USB
port on a computer (bidrectional). my wall outlet with two charge-only USB
ports still behaves different than my QC4
charger-adapter, with is being detected as "turbo power" ...which is the third mode, which it is able to detect - and where at least a charging controller should be present, in order to negotiate the volts and ampere used for charging. meanwhile there even is QC4+ available. there also is BATTERY_PLUGGED_WIRELESS
...eg. PowerMat, also only for compatible devices.