Taifun File & Mit AI2 Update Target SDK

Hi everyone i am trying to use taifun file extension @Taifun in android 14 it is not work, but it is work in android 10 and 7.0
I am using this block
filelistasync
I don't know is it because Ai2 need to upgrade target sdk or it is from taifun file extension.

Anyone can help me?
And when Ai2 upgrade target sdk?

1 Like

AI2 has just updated to targetSdkVersion = 33. There is no reason to target SDK 34 today (i.e. 1 year in advance).

I doubt that and I see no reason why it shouldn't work on Android 14.
Show your blocks and post a screenshot of the error message (if any).

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