Audio focus change

Hello creative kodulars, can you help me with how to set “Audio focus change?”

I am designing the radio app and it is working fine, but the problem is when the user is listening the radio or audio then the phone gets the coming call he has to stop the radio and receive the call because without that the audio will interfere and will not listen well to the phone call.

Down here are the blocks that I tried to solve the issue but I didn’t succeed please help me more with the blocks.

Warm regards

welcome to community, try using exp player block when other player started, it takes call as other player and there you can pause music.

Can you show blocks

But it seems that the .PhoneCallStarted event is not triggerd. But try …

That shouldn’t work because there is no other (Exo-) Player.

1 Like

i was talking about these, maybe works.

component_event (6)

component_event (7)

I even tried this is not working too because the background audio is irritating the user.

I have tried this is not working

have you tried other player instead of exo player?

I know you talked about that. Same answer … doen’t work because there is no other Player

If (Exoplayer1.volume == true)

Is incorrect. Exoplayer1.volume returns an integer.

lot of things needs to be get fixed. ( like i have also face this for another user he was also making a Radio app and facing 2 issues, 1st same this one and second radio stops after screen lock)

Yes, I think there is no solution at the moment.

See also here:

1 Like

Yes I saw it. There currently doesn’t seem to be a solution for these issues.

1 Like