Just check if it is divisible by 2.
@Override
public void onTick(long millisUntilFinished) {
long seconds = millisUntilFinished/1000;
if ((seconds % 2) == 0)
{ // even number--do some action }
}
This is assuming you are calling the onTick()
every second like
countdowntimer = new CountDownTimer(10000, 1000) {
This is probably preferable for you
Setting it up to call every 2 seconds should also work and better but leaving the original answer in case someone needs to call onTick()
more often
countdowntimer = new CountDownTimer(10000, 2000) {
then you could just do the action with every call to onTick()