private String convertMillisToMinsSecs(long milliseconds){
  int secondsValue=(int)(milliseconds / 1000) % 60;
  int minutesValue=(int)((milliseconds / (1000 * 60)) % 60);
  int hoursValue=(int)((milliseconds / (1000 * 60 * 60)) % 24);
  String seconds="";
  String minutes="";
  String hours="";
  if (secondsValue < 10) {
    seconds="0" + secondsValue;
  }
 else {
    seconds="" + secondsValue;
  }
  minutes="" + minutesValue;
  hours="" + hoursValue;
  String output="";
  if (hoursValue != 0) {
    minutes="0" + minutesValue;
    hours="" + hoursValue;
    output=hours + ":" + minutes+ ":"+ seconds;
  }
 else {
    minutes="" + minutesValue;
    hours="" + hoursValue;
    output=minutes + ":" + seconds;
  }
  return output;
}

private String convertMillisToMinsSecs ( long milliseconds ) { int secondsValue = ( int ) ( milliseconds / 1000 ) % 60 ; int minutesValue = ( int ) ( ( milliseconds / ( 1000 * 60 ) ) % 60 ) ; int hoursValue = ( int ) ( ( milliseconds / ( 1000 * 60 * 60 ) ) % 24 ) ; String seconds = "" ; String minutes = "" ; String hours = "" ; if ( secondsValue < 10 ) { seconds = "0" + secondsValue ; } else { seconds = "" + secondsValue ; } minutes = "" + minutesValue ; hours = "" + hoursValue ; String output = "" ; if ( hoursValue != 0 ) { minutes = "0" + minutesValue ; hours = "" + hoursValue ; output = hours + ":" + minutes + ":" + seconds ; } else { minutes = "" + minutesValue ; hours = "" + hoursValue ; output = minutes + ":" + seconds ; } return output ; }
convert millisseconds to hh : mm : ss format .
