Skip to content
This repository has been archived by the owner on Oct 13, 2019. It is now read-only.
/ Voltage.js Public archive

Small library providing information about the device's battery status

License

Notifications You must be signed in to change notification settings

Rudloff/Voltage.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voltage.js

Small library providing information about the device's battery status

##Usage ###Get battery level

Voltage.getLevel(callback);

###Is battery charging?

Voltage.isCharging(callback);

###Get charging time

Voltage.getChargingTime(callback);

###Get discharging time

Voltage.getDischargingTime(callback);

##Quick example The functions are asynchronous so you need to use a callback:

Voltage.getLevel(
    function (level) {
        console.log(level);
    }
);

##Credits The demo uses Firefox OS Gaia Icons.

About

Small library providing information about the device's battery status

Resources

License

Stars

Watchers

Forks

Packages

No packages published