How do I keep music playing on external player?

I have developed an app to time my exercise. When I play an internal sound "one minute" to notify my exercise period has one minute to go it causes my external (default) music player to pause. I want to find a way to prevent the player from pausing.

I have searched the internet for an app that can do this. I have also searched for a setting on my phone to prevent this. I can not seem to find a way to accomplish this.

Thanks in advance to anyone who can help.

Show your blocks. See also here:

Just to clarify: You want two Players to play at the same time, right?

No Sir,
I have music running on my default Phone Music app and I want to player sounds (short) within my MIT app inventor app without it causing my (external to MIT) music from being put into pause mode

Unclear.

As I already said:

And please explain exactly (step by step) what should happen.

1 Like

You want to see blocks of my player playing a single wave? What good will that serve?

My external music player is external. Most Android phone come default that when another sound is played on the music channel they automatically cause the player to go into pause.

That is the all of the story. If you want me to show you blocks then I will gladly do so but the blocks are just simply to play a sound. Atypical

Ok, so why are you making it a long story?

Btw, what does that mean?

What is then an internal player? :upside_down_face:

1 Like

12092021@212738¦990

external = outside my MIT app. "Sound" is the name of the app. Came with the phone and I use it to play my music. It is a separate app on the phone and is not inside my app ??????
How can I explain this differently?

internal = using "player" inside my MIT app. When I play the sound in my MIT app it causes the music player to go into pause. This causes the music to stop.

Perhaps you need to set off a notification (with a sound) instead of a sound/player sound ?

1 Like

Thank you TIMAI2

Part of this exercise app I designed is to put it in Airplane Mode so that there will be no interruptions during workout. The notification channel wont work in this case but thanks for the very good idea

This is not something you can configure from within your app but from the music player app...

You could try several music player apps and probably you can find a player, which does not pause...

If you program a music player in App Inventor there is the event OtherPlayerStarted, which can be used to pause the music or not

Taifun

1 Like

Thank you Taifun. I rather expected that to be the answer but I am disappointed that it is.
I was fairly sure if anyone knew the answer it would be you. This question requires a knowledge of the OS.

It also requires an understanding of what "external" means I have learned :grinning:

OOPS! OS means Operating System

For me it is still completely unclear what you are talking about here. And I'm actually pretty familiar with audio apps.

Is it really that difficult to clearly describe the problem?

Like this:

  1. Start app X and play sound1.
  2. Open app Y and play sound2.
    Expected result ... ?

:question:

Pretty sure OP's saying that they're playing music from the phone through an app, but when they start the Player component, the audio being played from outside the app pauses. It does seem pretty difficult to explain tbh...

1 Like

Okay.

No, not at all, as you have shown.

This is not possible with the Player component or the TaifunPlayer extension (that is based on the MediaPlayer). But it is possible with the ExoPlayer and with another Player extension that I recieved for testing purpose (not published yet). The ExoPlayer component is only avialable in Kodular. But there are extensions for it.

1 Like

I have just run a test on a Google Pixel 4a Android 12

An AppInventor app that plays music (from /Music directory)

Another AppInventor app that plays a sound, after a clock timer interval

Music playing in the music app was NOT paused when the sound in the second app was played.

Yes, but I think we are talking about the default player of an Android phone.

See here:

And this default player is paused when another app (is opened and) plays a sound (regardless of whether it is an AI2 app or not).

1 Like

Exactly... :wink:

Thank you TIMA12
Not the same situation:

  1. Playing music from an AppInventor music app
  2. Playing a timed sound from a seperate AppInventor app
    Result: no interruption

My situation:

  1. Playing music from default android system music player
  2. Playing a timed short sound from my app
    Result: auto-pause default android music player

AGAIN: TaiFun had it right when he stated:
This is not something you can configure from within your app but from the music player app...
You could try several music player apps and probably you can find a player, which does not pause...
If you program a music player in App Inventor there is the event OtherPlayerStarted, which can be used to pause the music or not

This problem of mine is an OS (operating system) problem . The default player chose to use the option of OtherPlayerStarted. The Android OS has this option built in. There are multiple old articals on Inet discussing this and:

  1. Some claim there is a setting somewhere to override this (no luck finding it on mine)
  2. A few claim there once was an app to change the system setting but the app has disappeared long ago

As I said and fully agree with TaiFun, this is an operating system problem. I would love to know how to override it but do not know how or IF

Thank You ALL

but instead, a method that works....

"a bend in the road is not the end of the road, unless you fail to make the turn"

to get started go here:
https://puravidaapps.com/file.php
and scroll down to the Jukebox example

1 Like