Home Stop another app's media player when i play new app's media player?
Reply: 1

Stop another app's media player when i play new app's media player?

Bipin Bharti
1#
Bipin Bharti Published in 2016-12-09 04:55:01Z

This question already has an answer here:

  • How to stop other apps playing music from my current activity? 2 answers

hello i am working on new music media player when i play song then not stop or not pause another app's media player like i have two apps 1) "gannna" and another is my app. When i play song in my app's media player then not stopping "ganna"'s media player song.
Note:My English is very bad so please don't give me negative mark it's humble request

Reena
2#
Reena Reply to 2016-12-09 05:01:46Z

Before your app starts playing audio it should request—and receive—the audio focus. Likewise, it should know how to listen for a loss of audio focus and respond appropriately when that happens.

You can achieve this functionality by 'Managing Audio Focus'. These Links may help you

https://developer.android.com/training/managing-audio/audio-focus.html http://android-developers.blogspot.in/2013/08/respecting-audio-focus.html

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.310608 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO