title: How to start same audio again on stop
body: <p>In my app I am creating <code>service</code> to play audio. When user press any <code>button</code> audio stop. But If user not press any <code>button</code> and audio file is of length 15 second after 15 second its stop. What I want is after 15 seconds its start again and its stop only when user click <code>button</code>.</p>
  
  <p>PlayAudio-</p>
  
  <pre><code>public class PlayAudio extends Service{
  private static final String LOGCAT = null;
  MediaPlayer objPlayer;
  
  public void onCreate(){
  super.onCreate();
  Log.d(LOGCAT, "Service Started!");
  objPlayer = MediaPlayer.create(this, R.raw.test);
  }
  
  public int onStartCommand(Intent intent, int flags, int startId){
  objPlayer.start();
  Log.d(LOGCAT, "Media Player started!");
  if(objPlayer.isLooping() != true){
  Log.d(LOGCAT, "Problem in Playing Audio");
  }
  return 1;
  }
  
  public void onStop(){
  objPlayer.stop();
  objPlayer.release();
  }
  
  public void onPause(){
  objPlayer.stop();
  objPlayer.release();
  }
  public void onDestroy(){
  objPlayer.stop();
  objPlayer.release();
  }
  @Override
  public IBinder onBind(Intent objIndent) {
  return null;
  }
  }
  </code></pre>