package com.android.ch12_service;
import android.app.Service;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.IBinder;
import android.util.Log;
import android.widget.Toast;
public class MusicService extends Service {
private static final String TAG = "MusicService";
MediaPlayer player;
@Override
public IBinder onBind(Intent intent) {
return null;
}
@Override
public void onCreate() {
Log.d(TAG, "onCreate()");
player = MediaPlayer.create(this, R.raw.old_pop);
player = MediaPlayer.create(this, R.raw.old_pop2);
player = MediaPlayer.create(this, R.raw.old_pop3);
player.setLooping(false); // Set looping
}
버튼1,2,3에 올드팝1,2,3이 나오게끔 어떻게만드나요