For android here a specific solution mixed java and C++ code: QML: Get Android battery level and status