Jump to content
Sign in to follow this  
Manuel S.

Open media file denied

Recommended Posts

HI, 

I created my media gallery using Delphi 10.4.2 and it works very well.

I'm migrating to Delphi 12.2 and the Gallery is having some issues.

The gallery reads, and if it does not exist, creates thumbnail files of the images present on the device from the \storage\emulated\0\pictures\.thumbnails\ directory.

Using API 34 when I open the file in this directory I get an access denied exception.

In manifest I have these permissions:

    <uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
    <uses-permission android:name="android.permission.MANAGE_MEDIA" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
    <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
    <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
    <uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="32" />

At runtime I check android.permission.READ_EXTERNAL_STORAGE and android.permission.WRITE_EXTERNAL_STORAGE.


Now I use Nokia 2.2, Android 11 and Delphi 12.2.

Edited by Manuel S.

Share this post


Link to post
4 hours ago, Manuel S. said:

I'm migrating to Delphi 12.2 and the Gallery is having some issues.

Please provide a complete, reproducible example.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×