I'm trying to play a specific sound when the countdowntimer reaches 9 seconds tell 0, but the sound quality is very bad and lagging and I get this error E/MediaPlayer: Error (1,-19)
public void updateTime(int secondsleft){
int minutes = (int) secondsleft / 60;
mseconds = secondsleft - minutes * 60;
String seconds = Integer.toString(mseconds);
if (mseconds <= 9){
seconds = "0" + seconds;
}
if (mseconds <= 10){
actionTextView.setText(Integer.toString(mseconds));
}
timerTextView.setText(Integer.toString(minutes)+":"+seconds);
}
Comments
Post a Comment