Player - Device Audio, Loop - Play Streaming

You will hear a pause while buffering (again).

I've started to switch to virtual screen... We can copy and paste blocks but not the design...

Dear Joe, sorry to have bored you with my request because of missing the android rules of screen management.

I just will need help to use itoo extension so the player don't stop when IDLE mode.

I think I can make an extension that allows you to control the player on any screen. I'll check out that challenge soon.

I would really appreciate Patryk because I started to use virtual screen and the App Inventor crashed and asked me to send report... and I loose all my work. So I have to restart from the 3 screens version of my application.

Example of how it works:

TestMultiScreenPlayer.aia (26.8 KB)

1 Like

@David_76 You should try the extension that Patryk shares, it works for me, try it and tell us if it worked for you.


Remember to download your AIA project to your computer every time you make a change so you don't lose your work.


Here is an example with Itoo:

Thank you all very much. I've started to rewrite the code with virtual screen now. I think the code will be more optimized in this way. I would prefer knowing these limitations before. I should have read more tutorials before.

Once again forgive me Joe for having asked you to work on your extension because I thought it was an issue. Now I know it is the way Android work.

And thanks again for the example with itoo. All your help was precious for me.

1 Like

Interesting, if you close all screens when switching, the sound can only be stopped and restarted on Screen2.

But only on Screen1, it works fine on Screen2 (even after switching screens several times).

Yes. With native Player:
Screen1 -> Screen2 is fine.
Screen2 -> Screen1 does not work.

Logcat shows an error that Activity cannot be killed. Maybe I will look into it.

But with this extension it works both ways.

1 Like

Yes, and that has been my experience from the beginning with App Inventor. In fact, the player does not stop when a sound is streamed, so the sound can no longer be stopped on any screen after switching. To stop the sound, the app must be closed and killed.

I'll check later...

:+1:

Any audio playback extension can be customized to play on multiple screens. It's certainly easier to implement internally than a separate extension for that.

1 Like

My problem is definitively solved with virtual screens. Thank you for your help...

Then your main screen should be even fuller now. :grin::wink:

Hi Joe and thanks again for your help and the Itoo example. In my case I only need to avoid the Joe's Player to stop when the smartphone is IDLE. Your example is a bit complicated for me to understand. Could you give me an other example with only the blocks that I need to keep the player alive in background ?

1 Like

I've been testing a new update to the player that avoids entering doze mode and works on Android 11, it stays active in the background, but not on 14 because the rules change in Android 14. I hope to fix it tonight.

2 Likes

Many thanks Joe, it would be nice it it could work ! You're amazing, thank you very much for your support.

1 Like

Would this be possible without requiring any special permission?

:pray:

Lito

@>-->---

1 Like