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. A very big problem with Android 11 and permissions.
Forum Updated to NodeBB v4.3 + New Features

A very big problem with Android 11 and permissions.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 3 Posters 656 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.
  • mrdebugM Online
    mrdebugM Online
    mrdebug
    wrote on last edited by mrdebug
    #1

    Hi, My app has to store some data in a local folder. So at start it creates a folder if does not exists.
    In order to read and write, my manifest file has got the following parameters:

    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    

    and everything works well.
    The problem is that google play requires targetSdkVersion=29
    If I change my manifest file using targetSdkVersion=29 my app can't create the folder!
    The app log says:

    "android.permission.READ_EXTERNAL_STORAGE already granted"
    "android.permission.WRITE_EXTERNAL_STORAGE already granted"
    "/sdcard/.abcd" mkdir() Error!!
    

    How can I resolve the problem? With Android 6 everything works well

    Need programmers to hire?
    www.labcsp.com
    www.denisgottardello.it
    GMT+1
    Skype: mrdebug

    1 Reply Last reply
    1
    • mrdebugM Online
      mrdebugM Online
      mrdebug
      wrote on last edited by
      #2

      Seems to be solved using

      android:requestLegacyExternalStorage="true"
      

      The row above works for api 29 (Android 10) but not for api 30 (Android 11)
      The api 30 solution is wanted.

      Need programmers to hire?
      www.labcsp.com
      www.denisgottardello.it
      GMT+1
      Skype: mrdebug

      JKSHJ 1 Reply Last reply
      0
      • mrdebugM mrdebug

        Seems to be solved using

        android:requestLegacyExternalStorage="true"
        

        The row above works for api 29 (Android 10) but not for api 30 (Android 11)
        The api 30 solution is wanted.

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #3

        @mrdebug said in A very big problem with Android 11 and permissions.:

        Seems to be solved using

        android:requestLegacyExternalStorage="true"
        

        The row above works for api 29 (Android 10) but not for api 30 (Android 11)
        The api 30 solution is wanted.

        There was a discussion about this recently on the Interest Mailing List: https://lists.qt-project.org/pipermail/interest/2021-May/037085.html

        You can subscribe to the list at https://lists.qt-project.org/listinfo/interest and join the discussion.

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        V 1 Reply Last reply
        1
        • JKSHJ JKSH

          @mrdebug said in A very big problem with Android 11 and permissions.:

          Seems to be solved using

          android:requestLegacyExternalStorage="true"
          

          The row above works for api 29 (Android 10) but not for api 30 (Android 11)
          The api 30 solution is wanted.

          There was a discussion about this recently on the Interest Mailing List: https://lists.qt-project.org/pipermail/interest/2021-May/037085.html

          You can subscribe to the list at https://lists.qt-project.org/listinfo/interest and join the discussion.

          V Offline
          V Offline
          Vega4
          wrote on last edited by Vega4
          #4
          This post is deleted!
          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