QtAndroidTools: BatteryState


BatteryState allow monitoring the battery level and state.

QtAndroidTools is a library that allows to simplify access to some native Android features from QML


QtAndroidTools library source here. The project provide a demo app showing the use of all features.

This tool install a listener for monitor the battery level and on charge state. There is nothing difficult in use since there are only two properties as follow:

import QtAndroidTools 1.0

QtAndroidBatteryState.level
QtAndroidBatteryState.onCharge

Both properties support QML value binding than you can assign to a control for show always the updated value as in the demo example.



Comments

Popular posts from this blog

Access GPIO from Linux user space

Launch an app from Android shell terminal

Android: adb push and read-only file system error