Qt/Qml in Android project and Bluetooth permission
-
Hello,
I encountered a weird problem. My setup is as following : I have a Qt/QML application (6.10.1) which can be standalone or included in an Android project (12+) (for preprocessing and some other treatments), as per https://www.qt.io/blog/add-qtactivity-to-existing-android-studio-project. Location permission is correctly forwarded/set up when I use my app in standalone mode or called from Android app.
Recently, I wanted to add TPMS sensors to my Qt app. I use QtBluetooth, add permissions request at runtime. Standalone app works as expected.
I then updated my Android project and manifest, requested permissions. But QBluetooth part never gets Bluetooth permissions and runtime requests in Qt are never fired/shown : Android app has permissions, main C++ in Qt has permissions, but Qt Bluetooth device scan failed.
Has anyone ever encountered that ?
My workaround for now is to create a Java class I call through JNI from my Qt part.