0
I have a countdowntimer that gets a long value of 86400000 ( 24 hours ) on my emulator android 5.1 it recognizes 24 hours and starts counting since then, but on other emulators and on my physical phone it does not start in 24 hours, it starts in 20, 18 hours, varies the device time. I don’t understand.
Code of my countdowntimer
private void contagemregressiva(final long temporestante) {
Log.d(TAG,"tempo restante recebido na contagem: " + temporestante);
new CountDownTimer(temporestante, 1000) {
public void onTick(long millisUntilFinished) {
SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss", Locale.getDefault());
Date date = new Date(millisUntilFinished);
txv_temporestante.setText(dateFormat.format(date));
temporestanteaa = millisUntilFinished;
}
public void onFinish() {
dados.setDia(dados.getDia()+1);
dados.setContagemVirou(true);
atualizarUI();
}
}.start();
}