Player - Device Audio, Loop - Play Streaming

Try this extension: AI2 Keep Awake
I tested it and it works fine also on Android 14.

1 Like

Many thanks Anke ! I've donwloaded this extension but I don't understand how to use it with Joe's extension to keep the player alive when the smartphone is in Doze mode. Could you share a screen copy of your code in app inventor with joe's player please ?

1 Like

@David_76
Yesterday I managed to get it working on Android 14, but I didn't have enough time to adjust some details, it also works with notification, but I don't use wake_lock.

@Lito
Notification permission is needed, but it is already integrated into the code and declared in the manifest.

Hi Joe. Many thanks for your work.At the moment I'm ill (it seems to be a flu with fever) so I've put coding on standby until I'm back on my feet. I can't wait to test the new version.

1 Like

Update, Version 1.0.2

I hope you recover soon.

I have already updated the extension, I hope it works fine on your device.
The update will not delete anything, you can install it without any problem, you will only need to use the 2 blocks to handle the foreground service. StartService & StopService.

The SetNotificationContent block is optional, but by default it has these values:
title: Playing
content: Audio playback in progress

Thanks a lot, Joe! You are the best. Without your extension, help and support, I would never have made it. Thanks to Anke, I understood the need to work with virtual screens and that there were no bugs in your extension. Without this partnership with you, I would never have succeeded in making this application. I'd like to thank you for the interest you've shown me and, above all Joe, I'd like to thank you for all the coding you've done to satisfy my requests. I'll never forget this partnership, which has enabled me to develop a very useful application for the amateur radio world. With all my gratitude, David.

1 Like

Thanks a lot David

I'm glad I could help, your request motivated me to resume the implementation of the foreground service, I'm glad to know that something I do has been useful to you.

I've been working on some extensions that could complement the player view, probably one of them you'll like, it's a slider created to manage the volume control in a dialog.

If you have any questions or problems with the extension, let us know.

Hi Joe. I just wanna to ask you a last tiny thing : In the notification area, there is two buttons : Pause and Stop. Could you replace Pause by Start ? If we could use our own text, I could replace this words by French translated one's.

1 Like

Hi David, you read my mind, it is already implemented, I will upload the update in a moment, I also made a change in the volume function, when updating the extension you will have to change the 2 blocks, I recommend moving the entries that are in the parameters to one side so as not to lose the settings, only those 2 blocks.

Update, Dic. 17, 2024. - Version: 1.0.3

Amazing ! How powerful is this extension now ! Many thanks for that work, I love it !

But, in my Android 14 device, in the notification area there are only two buttons displayed : Stop and Pause. I would like to display Play and Stop. Is it possible ?

1 Like

Pause and Play is a dynamic button, when you pause the Play button will appear instead and if you press the Play button the Pause button will appear.

20241217_035217

Yes, and to avoid any language barriers, simple icons should be used, like this:

In addition, a stop button is neither necessary nor helpful. If you want to close the app, you can do so via the app itself or exit the app via the task manager.

1 Like

You are absolutely right, the stop button is useless, and icons are a better option, I am going to make that change.

@Joe : It does not work for me. remember I play audio streaming and not MP3 : https://live.f4ipa.fr

In my case the Stop and Pause buttons are not dynamics but statics.

@Anke : For audio streaming, Pause is useless as we only need to start and stop the player.

And yes, buttons instead text is the universal solution you're right but the Joe's solution is very nice for me.

David.

By leaving only 2 options, which will be play and pause, I will make the function have the option to change the icons, so that if you do not want the pause icon you can put a stop icon.
That will work for streaming because it will stop listening anyway.

I've just tested the two buttons and they don't work. Perhaps you should use an option so the user can display or not any buttons and keep just the notification that something is playing. That would be enough for me.

Yes, I'm going to do that, it's a good idea too.

:ok_hand: :+1: