0

The new version of Android 13 no longer grants access to every folder for image or video.

Of course, I did add the READ_MEDIA_IMAGES permission in the manifest, but still, I can only access favorites/camera/screenshot/downloads, but not every other folder. It was working fine in earlier versions.

How to repeat issue and example: Use this library on an Android 13 device, ensuring we have many different folders.

Solution : I want to be able to access all folders like before.

some of my code

 private fun galleryIntent() {
        val intent = Intent(MediaStore.ACTION_PICK_IMAGES)
        intent.type = "image/*"
        startActivityForResult(intent, SELECT_FILE)

    }

[![Permission which i got from app][2]][2]

  private fun checkPermission() {
        val PERMISSIONS = if (Build.VERSION.SDK_INT>= Build.VERSION_CODES.TIRAMISU) {
            arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE,Manifest.permission.READ_MEDIA_IMAGES,Manifest.permission.POST_NOTIFICATIONS)
        } else {
            arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.CAMERA)
        }
        TedPermission(
            this
        )
            .setPermissionListener(permissionlistener)
            .setDeniedMessage("If you reject permission,you can not use this service\n\nPlease turn on permissions at [Setting] > [Permission]")
            .setPermissions(*PERMISSIONS)
            .check()
    }

check how its look, not able to get all folder from phone storage

tej shah
  • 2,995
  • 2
  • 25
  • 35

0 Answers0