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. Write information in USB (Android )

Write information in USB (Android )

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
androidusb qt
1 Posts 1 Posters 963 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.
  • FerniF Offline
    FerniF Offline
    Ferni
    wrote on last edited by
    #1

    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
    0

    • Login

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