Android: How to stop media (mp3) in playing when specific milliseconds come?
I have an mp3 file and I want to play a specific word in it. I have a start time ( 6889 ms ) and end time ( 7254 ms ). I have these codes: package com.example.playword; import java.io.IOException; import android.app.Activity; import android.media.MediaPlayer; import android.os.Bundle; import android.widget.TextView; public class PlayWord extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final TextView tv = new TextView(this); tv.setText("Playing...")