I want in my application, music playing regardless of what happening in application. I am trying to implement it with `Service`. Here is the **MyService.class**

```
import android.app.Service;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.IBinder;

public class MyService extends Service implements MediaPlayer.OnPreparedListener {

    MediaPlayer mMediaPlayer = null;
    private static final String ACTION_PLAY = "com.example.action.PLAY";

    public MyService() {
    }

    @Override
    public IBinder onBind(Intent intent) {
        // TODO: Return the communication channel to the service.
        throw new UnsupportedOperationException("Not yet implemented");
    }

    public int onStartCommand(Intent intent, int flags, int startId) {

        if (intent.getAction().equals(ACTION_PLAY)) {
            mMediaPlayer = MediaPlayer.create(this, R.raw.theme_song);
            mMediaPlayer.setOnPreparedListener(this);
            mMediaPlayer.prepareAsync(); // prepare async to not block main thread
            return 1;
        } else {
            return 0;
        }
    }

    public void onPrepared(MediaPlayer player) {
        player.start();
    }
}

```

Could you please help me about how I use `Service` in MyActivity and what other methods need to be defined in **MyService.class** to have the right result.