Merge "Fixing bugs in MediaPlayer docs" into klp-docs

This commit is contained in:
Joe Fernandez
2014-01-16 22:46:17 +00:00
committed by Android (Google) Code Review

View File

@@ -287,7 +287,7 @@ For example:</p>
<pre> <pre>
public class MyService extends Service implements MediaPlayer.OnPreparedListener { public class MyService extends Service implements MediaPlayer.OnPreparedListener {
private static final ACTION_PLAY = "com.example.action.PLAY"; private static final String ACTION_PLAY = "com.example.action.PLAY";
MediaPlayer mMediaPlayer = null; MediaPlayer mMediaPlayer = null;
public int onStartCommand(Intent intent, int flags, int startId) { public int onStartCommand(Intent intent, int flags, int startId) {
@@ -691,7 +691,7 @@ adding the following to your manifest:</p>
intent. You should then implement this class:</p> intent. You should then implement this class:</p>
<pre> <pre>
public class MusicIntentReceiver implements android.content.BroadcastReceiver { public class MusicIntentReceiver extends android.content.BroadcastReceiver {
&#64;Override &#64;Override
public void onReceive(Context ctx, Intent intent) { public void onReceive(Context ctx, Intent intent) {
if (intent.getAction().equals( if (intent.getAction().equals(