Battery Status plugin

battery

Following the NetworkStatus plugin, the BatteryStatus plugin has been released and gives Cobalt applications the ability to query the charging state as well as the battery level of the device.

Making your app aware of the device’s state can lead to better performance and enhance the user experience. The BatteryStatus plugin is a step further in this direction and allows your application to decide whether it should trigger a battery consuming task depending on the battery state.

Typical use cases include downloading non critical files when the device battery is charging or full, reducing data polling rate and disabling animations when the battery is low, etc.

The documentation and sources can be found in the plugin repository and examples are available in the Catalog sample. You can try it from the CLI with cobaltians create myApp Catalog.

FacebookTwitterGoogle+LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *