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 ContentProvider that is allowing access to the music resources? Could a service in his app actually be playing the music? Does it then become his responsibility to watch for phone events? Sure the consuming app should handle such situations and stop using the resource, but as a resource provider should you stop providing it in response to the same events? On Jan 29, 1:43 pm, Kevin Duffey <[email protected]> wrote: > 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 when > you take a phone call, write the developer and let them know for sure. They > didn't properly handle all aspects of their app being put on pause. Bad > design, not tested enough, or perhaps just not enough knowledge about all > the issues that need to be taken care of when something like that happens. I > am sure a developer would be happy to have feedback regarding that issue. I > know I would! > > But, that said, I seriously doubt you can stop other audio. If a thread in > an app you don't control is playing music, that app would have to be > listening for some sort of intent/message that says "stop music" then act on > it. Seriously doubt any app is developed this way other than maybe specific > media/audio playing apps, even then I doubt they allow other apps to control > them with such capabilities. > > On Fri, Jan 29, 2010 at 10:05 AM, Robert Nekic <[email protected]>wrote: > > > > > 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. > > >http://developer.android.com/intl/fr/reference/android/telephony/Phon... > > > On Jan 29, 12:50 pm, Alam <[email protected]> wrote: > > > Absolutely correct. But think that you have downloaded one application > > > from Android Market mostly a game and if you get an incoming call > > > while playing the game and received. That time the game application > > > still playing the sound which you could here in the speaker while you > > > are talking. Is it fine for anybody to accept this bad impression of > > > that game? I guess no one want this. The only thing is check if some > > > sound is playing than stop for such an high priority work. > > > > My intention is not to stop any music but want to stop playing sound > > > with this scenario. > > > Anyway please let me know if we can acheive it or not. > > > > Thanks and Regads > > > Alam > > > > Kevin Duffey wrote: > > > > My guess is.. a background service like the media player is playing it. > > If > > > > the user wants to play music on the media player, and your app stops > > it, > > > > you're doing something the user didn't do themselves, forcing them not > > to be > > > > able to listen to music they want while running your app. I don't know > > if > > > > it's possible with intents or what not to send the media player service > > an > > > > intent to stop it, but even so, I wouldn't want to just stop the music > > a > > > > user is listening to. First off, if they don't know that your app will > > do > > > > this, they'll wonder why their music stops. When they discover it's > > your app > > > > and you didn't ask them first, they'll most likely uninstall it. If you > > > > absolutely must stop it, and if it's possible to do so, at the very > > least > > > > you should present your end users with the option to turn it off first. > > > > > On Thu, Jan 28, 2010 at 8:22 AM, Alam <[email protected]> wrote: > > > > > > Hi, > > > > > > I want to know that can we stop playing sound or music of other > > > > > application which actually plays the music from our application? > > > > > > Something like get the handle of MusicPlayer or AudioManager in our > > > > > application and using this handle stop the currently playing sound. > > > > > > Please share some information on this. > > > > > > Regards > > > > > Alam > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > > > Groups "Android Developers" group. > > > > > To post to this group, send email to > > [email protected] > > > > > To unsubscribe from this group, send email to > > > > > [email protected]<android-developers%2Bunsubs > > > > > [email protected]><android-developers%2Bunsubs > > [email protected]> > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/android-developers?hl=en > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected]<android-developers%2Bunsubs > > [email protected]> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

