Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to use Smartphone Hardware in Qt Android App ?
QtWS25 Last Chance

How to use Smartphone Hardware in Qt Android App ?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
androidappgpscamerasensor
3 Posts 3 Posters 789 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Domo93
    wrote on 19 Aug 2019, 18:53 last edited by
    #1

    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.

    T 1 Reply Last reply 21 Aug 2019, 16:18
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 19 Aug 2019, 19:19 last edited by
      #2

      Hi and welcome to devnet,

      Yes you have to request the same permissions.

      See this thread to get started.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • D Domo93
        19 Aug 2019, 18:53

        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.

        T Offline
        T Offline
        Tom_H
        wrote on 21 Aug 2019, 16:18 last edited by
        #3

        @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

        1 Reply Last reply
        1

        3/3

        21 Aug 2019, 16:18

        • Login

        • Login or register to search.
        3 out of 3
        • First post
          3/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved