Mp3Tags extension

The double slash "//" matter only affects the File component, since you can start there without a slash to write to the "private data directory".

grafik

For the Media components (Player, Sound, VideoPayer) the path to assets is set without slashs (//):

grafik

1 Like

as you are talking about my player extension, what about looking at its documentation?

Set the audio source.
Prefix the filename with / (i.e. relative path) to look for the file on the SD card. For instance /mySound.mp3 will look for the file /mnt/sdcard/mySound.mp3. To read assets packaged with an application (also works for the Companion) start the filename with // (two slashes). If a filename starts with file:/// you can specify a complete path to the file. You also can assign an URL, just start the filename with http then.

Taifun

2 Likes

@Taifun Ok, thanks for the hint. I never needed the documentation for your Player ext. or the Player component (as they are self-explanatory) and therefore I probably didn't pay attention to it.

The // is only mentioned in connection with the File component in the AI2 documentation.
There is nowhere such a hint for the mentioned Media components (player, sound, video player). In addition, I have never seen any aia using this path in all the years.

As I said the // is only needed for the File component and seems to me to make little sense in your extension, especially since these slashes are not needed at all.

I tried to follow the logic from the file component in all my extensions...
it might be, that these slashes are not needed at all in this case... this to provide some compatibility to the player component...

Taifun

Ok. I will take your remarks about file acces into account and will post an update...

but i'd like to complete this extension with album cover art. I succed to do it in android studio, but it's a bitmap..AI compilator don't accept it when i try to compile it gave me an error.

so i 'd could save this bitmap in a file but i don't succed to do it in an acceptable way for AI compilator...
have you a way to do it ?

1 Like

I guess you will get an answer to your question in your other thread

Taifun

2 Likes

Yes ther are some awsers, but nothing working until now...

1 Like

3 posts were merged into an existing topic: Compile error with byte[]

Oh i can't edit my first post, so here is new one

You will find her my first extension i hope you will enjoy it.
I developed it in complement of TaifunPlayer extension i use to get Tags info of music file.

jml.Mp3tags.aix (6.2 KB)

sorry but unfortunatly i didn't succed to return album art Image :grimacing:

Here an exemple of use (just give Pathfile of your song)

1 Like

thank you for your contribution

Please follow the naming conventions, which is UpperCamelCase for property, method and event names (i.e. the first letter should be a capital letter) and lowerCamelCase for parameter names.

example:
naming

also you might want to use English method names...
Unbenannt

btw. there is already the following Mp3 Metadata extensions available: Mp3 Metadata Extension by enaixpeend

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Ok, I will update according to naming convention.

about MP3 Metadata extension, that's why i would like include album art... don't you know a way to save byte[] in a file without AI compilation error ? (so without "FileOutputStream")

this thread is about presenting your extension, so if you have questions about developing the extension itself, then please continue asking in your other thread. Thank you.

Taifun

Here update extension with good names and cover art (thanks to ewpatton for his help)

jml.Mp3tags.aix (8.2 KB)

1 Like

Please remember the naming conventions, which is UpperCamelCase for property, method and event names (i.e. the first letter should be a capital letter) and lowerCamelCase for parameter names, i.e. no underscores

Unbenannt

Taifun

Oups...corrected.
Sorry !

1 Like

mp3 path is not getting, i getting error file not found. please help or share aia file to better understand.

1 Like

here it is

Mp3Tags.aia (73.2 KB)

1 Like

Thank you for this extension.
Works very well - it can also get tags from FLAC files and from external SD card.

Thank you for this return...i'm happy it can helps you.

1 Like

A post was split to a new topic: Cannot resolve symbol 'appinventor'