Taifun File & Mit AI2 Update Target SDK

I don't understand that is mean ai2 will not upgrade sdk? or you mean what?


It is the simple block
blocks

there is no error just it is not return list of video it return ()
and my device have alot of videos that video extension mp4

Mp4 is a video format
My guess is you get am empty result because starting from SDK33 you need to ask for read video permission

Taifun

you mean i need to add READ_EXTERNAL_STORAGE permission or add READ_MEDIA_VIDEO?
I add READ_EXTERNAL_STORAGE but it is still not work, but READ_MEDIA_VIDEO I don't test it.

As I said

As @Taifun said, you must request READ_MEDIA_VIDEO permission on Android 13+.
But this permission is not declared in the Manifest automatically, even not if you add the File component (and enable READ permission).

On Android 13+ you must request READ_MEDIA_... and on Android < 13 you must request READ_EXTERNAL_STORAGE.

In order to be able to request the respective permissions, they must be declared in the Manifest.

Is that is mean there is no way to set READ_MEDIA_VIDEO permission? or i can set it using AskForPermission block? like this :point_down:
blocks (1)

This should work on all Android versions:

2 Likes

@Anke how did you add that permission in the manifest then in your latest version?

Taifun

By the way, it is not possible to list any directory for which READ permissions are required with the File component. You get an error message. I'll post that later in a separate topic ...

The permission(s) are added if they are manually request using the .AskForPermission blocks.

How you add it manually?


and what is the component you are using to get SdkVersion ?

Look at my blocks (post #8).

1 Like

@Anke

Search...

Hi @Anke & @Taifun it is not work

test.aia (38.6 KB)

But it should, try this one:

Try also a relative path:

or an absolute path:
/storage/emulated/0/

In addition, READ_MEDIA_... permissions are declared only when the blocks intended for this purpose are used. In other words, if READ_MEDIA_IMAGES is requested as a string, this permission is NOT declared in the manifest. None of this makes any sense at all.
@ewpatton

Blocks

It is not work

you are sending us a video having 1:25minutes... the first 1:10 minutes is very much uninteresting while we whatch until the app is installed... then you click both buttons and end the video...

depending on your device and the number of mp4 files you stored on that device it takes a few seconds until you get a result... my guess therefore is, you just do not have enough patience to wait for a result...

Taifun

1 Like

I doubt you're testing it on a device running Android 14.
The storage permissions should be queried there one after the other and look like this:

So test this version and save us the installation process (!) in your video, but record the video from the moment you open the (previously uninstalled and reinstalled) app.

1 Like