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. android 6.0 sdcard write permission?

android 6.0 sdcard write permission?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
7 Posts 3 Posters 6.1k Views 2 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.
  • M Offline
    M Offline
    Mr Pang
    wrote on last edited by
    #1

    What should I do if I want to write some files to /sdcard ?
    How does Qt5 qml request android permission?

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

      Hi,

      Qt doesn't, however Qt Creator offers you a nice environment to edit the needed files. Take a look at the Deploying an Android application in Qt Creator's manual.

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

      1 Reply Last reply
      0
      • M Mr Pang

        What should I do if I want to write some files to /sdcard ?
        How does Qt5 qml request android permission?

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by
        #3

        @Mr-Pang
        are you talking about the Android M runtime permissions?
        This is added in Qt 5.8 as private API and will become public in Qt 5.9. See QTBUG-50759

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        M 1 Reply Last reply
        1
        • raven-worxR raven-worx

          @Mr-Pang
          are you talking about the Android M runtime permissions?
          This is added in Qt 5.8 as private API and will become public in Qt 5.9. See QTBUG-50759

          M Offline
          M Offline
          Mr Pang
          wrote on last edited by
          #4

          @raven-worx
          Er, I have got a solution. Thanks.

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

            What solution is it ?

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

            M 1 Reply Last reply
            0
            • SGaistS SGaist

              What solution is it ?

              M Offline
              M Offline
              Mr Pang
              wrote on last edited by
              #6

              @SGaist
              Using QAndroidJniObject::callStaticMethod<void>()
              And the java code:

              public static void requestPermission(QtActivity activity){
                          activity.requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE,
                                      Manifest.permission.READ_EXTERNAL_STORAGE}, 1);
              
                      }
              
              1 Reply Last reply
              2
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Ok, thanks for sharing.

                Since you have found a solution please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

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

                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