[Interest] Qt6: Android: checkPermission is not available yet?

Mårten Nordheim marten.nordheim at qt.io
Sat Sep 18 18:45:06 CEST 2021


Did you add core-private (/ CorePrivate) to your dependencies?
It might print a warning when you do, though in this case it's to be expected.


From: Interest <interest-bounces at qt-project.org> on behalf of Alexander Dyagilev <alervdvcw at gmail.com>
Sent: Saturday, September 18, 2021 18:24
To: interest at qt-project.org
Subject: [Interest] Qt6: Android: checkPermission is not available yet?

Hello guys :)

I'm wondering that is the equivalent for this function:

bool checkPermission()
     static const QString
     QtAndroid::PermissionResult r = QtAndroid::checkPermission(PERMISSION);
     if (r == QtAndroid::PermissionResult::Denied)
         QtAndroid::requestPermissionsSync(QStringList() << PERMISSION);
         r = QtAndroid::checkPermission(PERMISSION);
         if (r == QtAndroid::PermissionResult::Denied)
             return false;
     return true;

It seems it does not exist?

I've tried this (Qt 6.2 RC):

#include <QtCore/6.2.0/QtCore/private/qandroidextras_p.h>

It can't be compiled due to the following error: fatal error:
'QtCore/private/qglobal_p.h' file not found

Interest mailing list
Interest at qt-project.org

More information about the Interest mailing list