Muchas gracias @German_Skena
Los formatos que puede agarrar son:
MP3 (.mp3)
WAV (.wav)
AAC (.aac)
MIDI (.mid, .midi)
OGG (.ogg)
AMR-NB (.amr)
AMR-WB (.awb)
Estos últimos 3, la disponibilidad puede variar según el dispositivo Android y sus códecs específicos.
FLAC (.flac)
3GP (.3gp)
M4A (.m4a): MPEG-4 Audio
.flac no lo he probado, pero los 2 últimos agarran bien en mi dispositivo android 11.
1 Like
Right now it's not possible, I have not tested that function, I will investigate that.
@Damiano_Zedda
1 Like
Anke
August 14, 2024, 11:25am
8
Joejsanz:
Play
Description: Plays an audio file from a URL.
Hmm, where is the .Play
method for audio files from external storage?
(I checked and found that the "url" socket can also be used for an absolute path. But it is at least confusing.)
1 Like
Admittedly it's confusing since it accepts an absolute path, I'll change it to say path.
Today I realized that my memory card is damaged and only receives music from the internal storage,
I'm going to look at that and add that feature.
Anke
August 15, 2024, 5:43am
10
Regarding internal and external storage see here: Some basics on Android storage system
I have formatted my memory card and I have verified that the GetAllMusicFiles function effectively captures all the mp3 music on the device, internal and external.
I also changed the name of the .Play function parameter and added usage examples.
Joejsanz:
Play
Description: Plays an audio file from a URL or absolutePath.
Example Usages:
Playing a local file from external storage:
Play("/storage/emulated/0/Music/song.mp3");
Playing a file from the web:
Play("https://www.example.com/path/to/song.mp3");
Playing a file from internal storage:
Play("file://" + context.getFilesDir() + "/song.mp3");
Anke
August 15, 2024, 10:05pm
12
This is a full path, not an absolute path. Maybe it's working with that too. I didn't check. But if this works too, it might also work with the PrivateDir
. I'll check later...
1 Like
Anke
August 16, 2024, 9:35am
14
Where is the new exension version?
Anke
August 16, 2024, 12:33pm
15
Did you check your extension with the APK? There are permission errors (at least on Android 13+).
I'll check that out later, as soon as I can get the computer.
I think I missed adding this READ_MEDIA_AUDIO for when it is android 13+
1 Like
Anke
August 16, 2024, 3:30pm
17
Yes, but even if I request this permission (i.e. automatically declare it in the Manifest), a storage permission error is thrown.
Please check your extensions beforehand also with the compiled app.
I've been struggling to get my laptop to work, it only lasts 2 minutes and turns off, I think I'll need another one, anyway...
I haven't been able to review the code, but if I'm not mistaken, the code fails because I didn't set the READ_MEDIA_AUDIO permission to the Manifest when creating the extension.
Anke
August 17, 2024, 10:29am
19
I don't think so, because (as I already said) I declared this permission in the Manifest, requested it und got the permission error anyway.
1 Like
ABG
August 17, 2024, 11:06am
20
Joejsanz:
I've been struggling to get my laptop to work, it only lasts 2 minutes and turns off, I think I'll need another one, anyway.
Find a program to monitor CPU heat.
Sounds like a clogged or failing fan.
1 Like
So there is something very wrong in the code, as soon as I can access it I will review it.
It's probably already defective, it's a somewhat old laptop, I'll look for that program.
Code fixed, permissions are now also granted on Android 13+
Tested on android 14.
Hello!
Amazing extension! Thank you for this player!
I'm using it to play *.mp3 files by link..
But how can I hide this notifier at the initialization moment?
Thank you!
1 Like