[android-developers] Re: How to stop playing music or sound of other application

2010-01-30 Thread Alam
Well first of all thanks to everyone for their posts. Its seems that I'd confused some of them. Let me first clear this.Suppose you have downloaded some game (*.apk) from Android Market. Now you are playing the game with its music on and in between you got some call which probably you picked up.

Re: [android-developers] Re: How to stop playing music or sound of other application

2010-01-30 Thread Kevin Duffey
So Alam, are you building a voice dialing app.. where your app controls the voice call.. you could record the audio of the chat, for example.. and you're trying to silence other music from any other app playing? I mean, you're talking about two apps.. one being a game (not yours) that a user

[android-developers] Re: How to stop playing music or sound of other application

2010-01-29 Thread Robert Nekic
I'm not sure I fully understand your question...but it sounds like you might want to look at the PhoneStateListener. This can listen for and respond to events; such as an incoming call or when a call disconnects.

Re: [android-developers] Re: How to stop playing music or sound of other application

2010-01-29 Thread Kevin Duffey
I understand what you are saying... although I am not sure how that applies to whatever app you are working on. It is up to every developer to properly stop threads, audio, etc whenever their app is put into pause mode, or shut down. Period. If you are finding a game that continues to play music

[android-developers] Re: How to stop playing music or sound of other application

2010-01-29 Thread Robert Nekic
Well, he mentions that the music being played is actually from his application...so depending on how that is occurring, he might have some control over it, no? I don't have any experience using ContentProviders so I might be way off here...but is it conceivable that his app exposes a

[android-developers] Re: How to stop playing music or sound of other application

2010-01-29 Thread Bob Kerns
In addition to the other comments -- if you just need to make the media quiet -- you can temporarily turn the volume down for the AudioManager.STREAM_MUSIC audio stream type. See AudioManager.setVolumeStream(). This won't stop playback, but at least it will be silent playback. On Jan 28, 8:22