Asif k wrote: > Hi all, > > I am playing the .mp3 which is opened using intent.ACTION_VIEW . So > it opened with android's internal mediaplayer and thus I dont have > handle of it. > > I had tried to get the handle using , > > MediaPlayer mp = (MediaPlayer) getSystemService > (mContext.WINDOW_SERVICE); > > but it gives ClassCastException. I want to stop this file > programmatically, so I want its handle.
You can't do that. If your goal is to play music under your control, use MediaPlayer, SoundPool, or one of the other audio playback classes. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books.html --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

