MarcC wrote:
> Can anyone tell me how to stop media player that was started in a
> previous activity?

You can't directly, AFAIK.

> For ex. In activity-1 button pressed that did - mp.start(); then
> activity-2 starts for different layout with new buttons, then when
> button pressed, mp.stop is called, but does not stop the media from
> the first activity.

You would need the second activity to somehow notify the first activity
to stop the playback. Ideally, you would just do all of this in one
activity, or have the MediaPlayer be managed by a service, as
activity<->activity communications on-the-fly strikes me as a more
fragile pattern.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

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