Example code for applying for Android permissions in QT 6.5.3.
-
Hey everyone! I'm currently working on a project using QT 6.5.3 and I need to apply for Android permissions. But I'm kind of stuck and not sure how to do it exactly. Does anyone have some example code for applying for Android permissions in QT 6.5.3 that they could share with me? Thanks a lot in advance!
-
Take a look at https://doc.qt.io/qt-6/permissions.html
-
@jsulm Thank you very much for your answer. QT6 already has only these few permissions built-in.(QBluetoothPermission,QCalendarPermission,QCameraPermission,QContactsPermission,QLocationPermission,QMicrophonePermission)
If I want to apply for Wi-Fi permission, specifically "android.permission.CHANGE_WIFI_STATE", I don't know how to achieve it. And for other permissions that are not built-in, how can I apply for them? -
I've tried it.
QT6.5.3 automatically generates XML files, and manual modifications don't take effect.
In addition, I have tried adding the permission in the.pro file ,by adding "ANDROID_PERMISSIONS += android.permission.CHANGE_WIFI_STATE" or ANDROID_MANIFEST method, but neither of them has been successful.