QtAndroidTools: ApkInfo


ApkInfo tool will return info about the apk containing the executed app.

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.

Once done you can read the apk info from the QtAndroidApkInfo object as follow:

import QtAndroidTools.ApkInfo 1.0

QtAndroidApkInfo.firstInstallTime
QtAndroidApkInfo.lastUpdateTime
QtAndroidApkInfo.packageName
QtAndroidApkInfo.versionCode
QtAndroidApkInfo.versionName
QtAndroidApkInfo.requestedPermissions

Explanation about fields above can be found in the official Android documentation here. The tool export only the most important info but if you need to have some additional data you can easily add you code by using JNI interface as showed in the sources.



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