Unresolved issue with Android 13+ permissions

No it didn't work :face_with_head_bandage:

What didn't work ? Getting the file path ?

Yes

You are trying to access files in the Initialize event before having received permission...

First get permission, then read the file

Taifun

You are correct, but I was not able to obtain permission

I always read, and then re-read this:

and this

and this too

before I do anything that might be reading or writing text files outside of the ASD (and in it for that matter)

1 Like

Move the blocks to access the files from the Initialize event to somewhere else, for example a button click event

Then get the manage all files permissions before accessing the files

Taifun

From looking at your blocks, it looks like you are checking if the SDK is >= 33 and then asking for READ_EXTERNAL_STORAGE permission. This permission no longer exists in newer versions of Android you have to instead request individual permissions like READ_MEDIA_IMAGES, etc. So effectively, you are asking for a permission that doesn't exist and the OS is denying you, which makes sense.

@ewpatton Do you need a permission to read a text file from Downloads or Documents ? (with the File component)

yes

I sent the text file, the aia file, and pictures of the blocks
Andriod Ver 10 Is Working But Up To 12 Not Work

Item.txt (26 Bytes)


Adam87777777.aia (698.1 KB)

My understanding is that the app can only read files it has created at that point and to gain access to the file otherwise you have to ask the user to do so, either via the FilePicker component we've added or the SAF extension.

Is there an example of the application you sent?

No, not on Android 11+. Then you can only read text files that are created by the app itself. On Android < 11 you can of course also read test files that are not created by the app with READ_EXTERNAL_STORAGE permisson.

Unfortunately you ignored the help you already received earlier

And after getting the all files permission you do not have to worry about read or write external storage permission anymore

Taifun

I don't think it's possible to read a text file this way (at least not with the File component), neither with Companion nor the APK.

You cannot create a text file outside of one of the Shared folders on Android 11+ (without MANAGE_EXTERNAL_STORAGE permission or without using SAF). And these Shared folders for non-media files are only /Download and /Documents. This is all explained in my guides @TIMAI2 posted.


The application you sent me worked, but I would like to see the blocks, please

I didn't send you anything.
It seems you are now talking about this topic: How to request and grant MANAGE_EXTERNAL_STORAGE permission. There are all blocks...

Oh, I've read the whole thread now and it seems to be dealing with this topic from the start. Your blocks from the first post have nothing in common with the ones I showed in my guide. So use these: