How to use Smartphone Hardware in Qt Android App ?
-
Hello,
I have to create three small Android Apps in Qt using the hardware of a smartphone (GPS, Camera, OrientationSensor). I tried it by myself doing this examlpe https://doc.qt.io/qtcreator/qt-creator-accelbubble-example.html# creating UI worked but when i configured the Sensor and try to run it, the App crashed (I tested it on my real device Android 9). It is so frustrating, I dont find good explanation in the internet. I created already Apps with Android Studio and if you want to acces the sensors for example you have to request Permission, i wondered if you need not do this in Qt cause the Example didnt say something like it.
So my Question is, can you please describe me how i can acces the hardware module which i mentioned above. Please tell me all important steps, and it would be nice if you give me some example code, i have real Problems in App Development in Qt and i dont find any good Tutorials about it.
-
@domo93 You clearly haven't read the Qt documentation or looked at the examples, because everything you asked for is there.
https://doc.qt.io/qt-5/android.html
https://doc.qt.io/qtcreator/creator-deploying-android.html