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. Without native code, how to get iOS and Android device id?
Qt 6.11 is out! See what's new in the release blog

Without native code, how to get iOS and Android device id?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 142 Views 1 Watching
  • 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.
  • Quang PhuQ Offline
    Quang PhuQ Offline
    Quang Phu
    wrote last edited by
    #1

    Hello,

    I am trying to get device unique id of android and iOS, how to get that without native code?
    I used

        qDebug() << "Machine ID:" << QSysInfo::machineUniqueId();
    

    I worked well on MacOS with display "Machine ID: "B4AC7FB2-555D-5F77-BA59-D38B28F9821F"" but return "" on mobile devices.
    I searched on Internet but it seems must use native code for each mobile os.

    1 Reply Last reply
    0
    • Nils SjobergN Offline
      Nils SjobergN Offline
      Nils Sjoberg
      wrote last edited by
      #2

      Write a small native JNI layer for Android, Objective-C++ for iOS to access Android ID / identifierForVendor, because QSysInfo::machineUniqueId() is not implemented on mobile platforms in Qt

      "What's up, Doc?"

      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