▶ MediaSessionPlayer - Play audio in the background, with Media3 ExoPlayer

Hello can we use this app for a stream as well? if yes how? thanks.

Yes, you can create your own playlist to which you can add links to streams. In the sample application, in the resources there is an example of a list. You just need to use another block to read this list instead of files from the device. I can later make some very simple example of such an application.

With a small modification of the apk, we can also use this player with android auto.

1 Like

For example, can it play internet radio links? What if we want to listen to music with a list of radio channels, not an mp3 list?

Instead of building a list of local mp3 files you can build a list of URLs. You just need to know the URLs.

Perhaps I'll find some time over the weekend to prepare an example.

1 Like

I m using json file but very hard.I m lost in codes :slight_smile: can you help me everyone ?

1 Like

I started creating an example.

1 Like

I added an example. You add the list as a string directly to the block, or you use the File component to read the list from any file.

1 Like

Wow, it's really great, thank you very much Patryk_F, I will share the sample file with you as soon as possible...

Hello, I haven't been able to work with the program for a long time, but I was able to make an example. I can finally listen to the radio in my car. Patryk_F, thank you very much. I am sharing the .apk file and .aia file with you.
ai2player_stream.aia (3.0 MB)

ai2player_stream.aia (3.0 MB)

1 Like

1 Like

Yes, the error is possible because this block was added only to get the folder. I didn't check it for files. I'll look into it.

Hi
Here's some feedback.
I'm using the original aia v1.3 and v1.3 of the extension from this forum

My phone froze when the app was brought to foreground.

I added the debug extension - xyz.kumaraswamy.ai2debug to track where the errors occur.

Here's the screenshot of the errors:

Also the aia with debug extension:
ai2player_v1_3.aia (3.1 MB)

Phone: Samsung Galaxy flip 5
Android 14

Hope the info is helpful.
Thanks.

What brand of phone, what android. On my POCO with android 15 there are no errors without debugging extension. The bug didn't occur in previous versions?

Try it. I turned off toasts from Notifier.
ai2player_v1_3 (1).aia (3.1 MB)

Phone: Samsung galaxy flip 5
Android 14
I will try on the very first version 1 and feedback

Will also try the aia you've just posted.

Hi
I've just tested version 1 of the aia and aix and got the same errors when using the debug extension.

I can still play tracks with these errors

However at random when app brought to foreground the phone has this error

Without the debug extension the phone feeezes

But you tested this extension some time ago and didn't report a problem. What has changed since then? The debugging extension catches some unimportant errors. The errors that appear without this extension are important.

Try the latest AIA.

The errors randomly appeared only recently. I've not changed anything in the aia files.

With the latest aia that you've just posted with the notifiers disabled....

These are the steps i did:
1] select folder
2] select band eg: Deep Purple
3] select album eg: 1970 - In Rock
4] clicked use this folder in file picker dialog
5] clicked Album or Artist folder menu item
6] clicked In Rock album or Deep purple

This same error message occurred if i use debug extension:
Runtime Error Unable to add window -- token android.os .BinderProxy@22b5afc is not valid; is your activity running

Without debug extension phone feeezes.

I don't quite understand. Does this mean that without Notifer it's ok?

I meant to say "ok, now with the latest aia...."

Not that its okay with notifiers disabled

Whether Notifier enabled or disabled it still shows that error.

Anyway thanks for making this extension and the sample aia files.
Greatly appreciated.
Just giving feedback on my experience with my phone.

Maybe its just my phone then
Samsung flip 5 with android 14

1 Like