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. QT 5.4 Android device information
QtWS25 Last Chance

QT 5.4 Android device information

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 2 Posters 931 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
    DmitryHome
    wrote on last edited by
    #1

    hi. tell me how to take the information about the type of device (smartphone, tablet ...) in Qt 5.4 android or if that is possible in qml.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alexleutgoeb
      wrote on last edited by
      #2

      Hi,

      In QML you currently only get the platform you're running on. For further details you can use the JNI interface to get the information out of Android's native classes and set them as Qt Quick context properties to use them in code (in V-Play we have some properties like the "screen diagonal":http://v-play.net/doc/vplay-gamewindowapplicationwindow/#diameterInInches-prop which can be used to differentiate between smartphones and tablets for example).

      Best,
      Alex

      1 Reply Last reply
      0

      • Login

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