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/PhoneStateListener.html


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]>
> > > 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

Reply via email to