Android Question AudioManager AUDIOFOCUS_GAIN_TRANSIENT

Yngveh58

Member
Licensed User
Longtime User
Hello
Has an app that reads messages with MediaPlayerStream.
Have tested with radio headphones it works
In carradio with source media selected it works to.

And now I want to close the car radio fm and stream in the same way as with calls.
Simple explained mute car fmradio and play from my app.

Have looked at android.media.AudioManager AUDIOFOCUS_GAIN_TRANSIENT and that seems to be what I'm looking for.
Is there anyone who can help me with an example.
/ Yngve
 
Top