I have created my own mediaplayer in android -



I have created my own mediaplayer in android -

my problem when device mediaplayer playing song mediaplayer not stopping.both mediaplayer playing song together.

when application needs output sound such music or notification, should request sound focus. 1 time has focus, can utilize sound output freely, should hear focus changes.

use audiomanager request sound focus , implement audiomanager.onaudiofocuschangelistener respond sound focus changes.

so hear audiofocus changes , modify app accordingly. see hyperlink more information.

android

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -