Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Cannot access files or folders from SD card in Android version>6 versions
Forum Updated to NodeBB v4.3 + New Features

Cannot access files or folders from SD card in Android version>6 versions

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 3 Posters 1.4k Views 3 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.
  • H Offline
    H Offline
    halil sogut68
    wrote on last edited by
    #1

    I am using qt version of 5.5.1 and my application works pretty well in android 5 however, my tablet got update yesterday and android version now 6 (marshmallow) and my application doesn’t see contents of sd card. However, sd card directory is exist but when I try to access any directory in Sd card I couldn’t access this directory with Android version>6.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Android 6 has changed the permission system.

      See this article about that subject.

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

      H 1 Reply Last reply
      1
      • ekkescornerE Offline
        ekkescornerE Offline
        ekkescorner
        Qt Champions 2016
        wrote on last edited by
        #3

        and see this app HowTo do it:
        https://github.com/ftylitak/qzxing/tree/master/examples/QZXingLive

        ekke ... Qt Champion 2016 | 2024 ... mobile business apps
        5.15 --> 6.8 https://t1p.de/ekkeChecklist
        QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

        1 Reply Last reply
        2
        • H Offline
          H Offline
          halil sogut68
          wrote on last edited by
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            Android 6 has changed the permission system.

            See this article about that subject.

            H Offline
            H Offline
            halil sogut68
            wrote on last edited by
            #5

            @SGaist @ekkescorner Thanks for replies but as you mention that, I exemine the article and I followed those steps. After granted permission to read to SD card (Manifest.permission.READ_EXTERNAL_STORAGE,Manifest.permission.WRITE_EXTERNAL_STORAGE), I couldn’t reach the SD card path it returns false in Android >6 as I mentions below. The same code block works fine in Android 5. Besides, I use the code bloks by ekkescorner but I got the same fault. Thats all which I can say I wait a response as soon as possible.Thanks.
            File file = new File("/storage/extSdCard/TPK/Tpk.tpk");
            Log.i("file.exists : ",file.exists());

            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