title: In Android, control (play/pause) media player from external code
body: <p>I'm very new to Android programming. As a first hobby project, I'd like to write a program to control the media player app, in particular play/pause (or toggle) or even better, fast forward/backward.  Is it possible to do this?  If yes, are there any tutorials or sample code?</p>
  
  <p>Thanks very much.</p>
  
  <p><strong>Clarification:</strong> maybe I was not clear enough in my original question. I don't want to play audio/video inside my app, but I want to control other media player apps (says the default music app) from my app. For example, my app has only one button, if the default media player app is playing some music (in the background) and I push that button, the music is paused.</p>