C

AndroidAppsUtils Class

Helper class wrapping the important functionalities to manage Android apps. More...

Header: #include <AndroidAppsUtils>
qmake: QT += androidappsutils
Since: Qt 5.15
Inherits: QObject

Public Functions

AndroidAppsUtils(const AndroidAppsUtils &)
virtual ~AndroidAppsUtils() override

Signals

void appInstalled(QtAndroidAppsUtils::AppItem *appItem)
void appUninstalled(QString packageName)

Static Public Members

QtAndroidAppsUtils::AppsListModel *installedAppsModel()
AndroidAppsUtils *instance()
bool showAppInfo(const QString &packageName)
bool startApp(const QString &packageName)
bool uninstallApp(const QString &packageName)

Detailed Description

Member Function Documentation

AndroidAppsUtils::AndroidAppsUtils(const AndroidAppsUtils &)

Default constructs an instance of AndroidAppsUtils.

[override virtual] AndroidAppsUtils::~AndroidAppsUtils()

Destroys the instance of AndroidAppsUtils. The destructor is virtual.

[signal] void AndroidAppsUtils::appInstalled(QtAndroidAppsUtils::AppItem *appItem)

This signal is emitted when the corresponding appItem is installed.

[signal] void AndroidAppsUtils::appUninstalled(QString packageName)

This signal is emitted when the app with the corresponding packageName is uninstalled.

[static] QtAndroidAppsUtils::AppsListModel *AndroidAppsUtils::installedAppsModel()

Returns a model pointer (ownership transferred to the caller) based on QAbstractListModel for installed Android apps. The model manages a list containing app name, package name, and icon.

[static] AndroidAppsUtils *AndroidAppsUtils::instance()

Returns a pointer to the AndroidAppsUtils instance.

[static] bool AndroidAppsUtils::showAppInfo(const QString &packageName)

Shows the app info settings view for the package specified by packageName. Returns true if the the app Activity is found and started, false if not found.

[static] bool AndroidAppsUtils::startApp(const QString &packageName)

Starts the app associated to a given package name, packageName. Returns true if the the app Activity is found and stated, false if not found.

[static] bool AndroidAppsUtils::uninstallApp(const QString &packageName)

Requests the uninstall dialog for the app associated to a given package name, packageName. Returns true if the the app Activity is found and started, false if not found.

Available under certain Qt licenses.
Find out more.