1

I'm using SeekBar in my application and when user seeks it should reset teh chronometer apporpriately.

I wrote the code as below.

chronometer.setBase(SystemClock.elapsedRealtime());
chronometer.setBase((mediaPlayer.getCurrentPosition()));

but it didn't help. chronometer shows like 2:48:00, which is very big and unrealistic for a 2:00 file.

Can someone help me with this please.

Thanks in advance.

Jay Mayu
  • 17,023
  • 32
  • 114
  • 148
  • could you comment the second line and tell me what happens – Samuel Aug 29 '11 at 10:09
  • I remember updating a comment below, but now its not working.. :( here it vanished :O anyway after udpating as u said the counter goes as this 00:0) and 00:0* i dont knw the problem. I tried to change as u said and some other ways too it didn't work. Any clue plz. – Jay Mayu Aug 29 '11 at 10:47
  • i have updated my answer. try this. my day is almost over. – Samuel Aug 29 '11 at 10:58

1 Answers1

2

can you try this

chronometer.setBase(SystemClock.elapsedRealtime() - mediaPlayer.getCurrentPosition());

and tell me what happens.

Samuel
  • 9,883
  • 5
  • 45
  • 57