My MP3 Player (MP3 Player)

Look for where you used the text 'project_state'

No text 'project_state' on my block code.

I got the exact root cause of problem by put this block:

The root cause of problem should be this block:

Anyone could assist what's wrong with the IF block?

Hi MIT App Inventor team,

May I conclude the root cause of problem is the Taifun file extension cannot working well on retrieving files list in internal memory and SD card in Android 10 devices based on my below checking?

Please advice.

Thanks

Try this app on all your test devices (especially Android 10, 13, 14):

I've found that on older devices it can take up to 30 seconds to list 700-850 audio files. On Android 10, 13 or 14 test devices, 400-850 audio files were listed in 1-2 seconds.


No, but just check it with my app on your Android 10 device. My app uses @Taifun's File extension. However, it should also work with Sunny's (@vknow360 ) FileTools extension.

Your method of listing the audio files is unnecessarily complicated and, as you can see, it is also prone to errors. Some devices may contain files (especially in the cache) that do not have an extension. This is why you get the error you know:

Of course the error can be caught:

but the blocks are getting bigger, more confusing and probably more computationally intensive and therefore possibly slower.


The way I have described is much easier and possible errors are avoided.

1 Like

Hi Anke,

I will follow your block coding to resolve my problem.
Thanks

Hi Anke,

Already working well now on android 10 and 13 with the following fixing block code.

Thank you very much for your input and guidance.

My_Mp3_Player_Testing (1).aia (901.9 KB)

I already fix the app and I hope could running well on your android 10 as the following fixing block code.

My_Mp3_Player_Testing (1).aia (901.9 KB)

Thank you very much for your input to my app.

1 Like

I already updated the app to add feature "Filter audio files extension" to make user could select what audio files extension (mp3, m4a, wav, midi, flac, and ogg) he/she want to be included in playlist.

To do it click menu "Filter audio files extension" from popup menu on top right of screen then click button(s) of audio files extension you want to be included in playlist till the background of button change to green. You need to refresh your current playlist to make your change take effect. The default of audio file extension included in playlist only mp3 files till you change it.

My_Mp3_Player_v2.aia (972.2 KB)

A great app. Cheers and thank you

1 Like


library_music

Is it possible for deleted files to not appear in the playlist?


I countered this problem with the menu, the menu with the three dots

When exactly does this error occur?

when I press the menu to show what it has

This one?

grafik

If so, I do not have this error (on Android 13).

Yes that's it.
ok that's ok i went to do it again myself with the original next to it, for training and it didn't come out perfectly, just like the original works, without this problem.
Maybe I'll try again tomorrow

May I know android OS version of your phone device.

It seem your device already running android 13 version which you should not experience problem on access three dot menu.
Please try to make sure the following things for your problem click three dot menu:

If they are all already been set as those picture then you should not get problem accessing three dot menu.