Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Unsolved Write information in USB (Android )

    Mobile and Embedded
    android usb qt
    1
    1
    706
    Loading More Posts
    • 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.
    • Ferni
      Ferni last edited by

      Hi! I took a simple Hello World and tried to create a txt file in a usb device connected via OTG cable. I tried this application in Linux and it works fine but on Android I cannot write in the desire location.
      Since I must connect OTG to use my pendrive, I cannot debug my application, so my question is: how can I read and write information in an USB drive in Android? Also, how can I detect that a pendrive was plugged?

      I added READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE permissions but no success neither :/
      The path that I think that belongs to my usb drive is /storage/usbdisk. Is this a standard for all devices?

      I based my Hello World in this info: http://doc.qt.io/qt-5/qstorageinfo.html#details

      PS: I'm targeting Android-19 but using devices that run Android-21 and Android-23, is this important for this case?

      Thanks,
      Fernando

      1 Reply Last reply Reply Quote 0
      • First post
        Last post