Version: Smart Feature Phone 3.0

PowerSupply

Description#

The PowerSupply checks:

  • If device is charging
  • Types of power supply device is charging with

Permission#

Add

"powersupply": {}

to app manifest permissions.

sample code#

powersupply usage

const powersupply = window.navigator.b2g.powerSupplyManager;
powersupply.powerSupplyOnline;
powersupply.addEventListener('powersupplystatuschanged', () => {
...
});