Cannot grant permission for "android.permission.ACCESS_WIFI_STATE"
-
I've tried using
QtAndroid::requestPermissionsSync(QStringList({"android.permission.ACCESS_WIFI_STATE"}))before any JNI calls and also including the permission in myAndroidManifest.xmlfile, but without success; Art reports that my app still doesn't have permission. What can I do to ensure that my App does have that permission? -
It turns out that I had failed to copy my modified
AndroidManifest.xmlfile, asqmakehad copied the default manifest without the required permission tag. Make sure that you have included an assignment toANDROID_PACKAGE_SOURCE_DIRunder theandroidblock in your qmake project file:android { QT += androidextras ANDROID_PACKAGE_SOURCE_DIR = \ $$PWD/android }I couldn't request the permission with
QtAndroid::requestPermissionsSyncbecause the underlying Android API method only works for dangerous permissions:android.permission.ACCESS_WIFI_STATEis classed as a normal permission.