I need to get the progress time of the video that is played in \"VideoView\"(ie the time shown in the left hand side in progress bar).
Any help will really be apprec
You can use Thread for this purpose like below:
videoView.start();
videoView.setOnPreparedListener(new OnPreparedListener() {
public void onPrepared(MediaPlayer mp) {
running = true;
final int duration = videoView.getDuration();
new Thread(new Runnable() {
public void run() {
do{
textView.post(new Runnable() {
public void run() {
int time = (duration - videoView.getCurrentPosition())/1000;
textView.setText(time+"");
}
});
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
if(!running) break;
}
while(videoView.getCurrentPosition()