Merge "Fixing bugs in MediaPlayer docs" into klp-docs
This commit is contained in:
committed by
Android (Google) Code Review
commit
acf2b906b3
@@ -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 {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context ctx, Intent intent) {
|
public void onReceive(Context ctx, Intent intent) {
|
||||||
if (intent.getAction().equals(
|
if (intent.getAction().equals(
|
||||||
|
|||||||
Reference in New Issue
Block a user