public static String describeMinutes(Context context,int minutes){
  Resources r=context.getResources();
  if (minutes < 60) {
    return String.valueOf(minutes) + " " + r.getString(R.string.minutes_abbr);
  }
 else {
    int hours=minutes / 60;
    int mins=minutes % 60;
    if (mins == 0) {
      return String.valueOf(hours) + " " + r.getString(R.string.hours_abbr);
    }
    return String.valueOf(hours) + " " + r.getString(R.string.hours_abbr)+ " "+ String.valueOf(mins)+ " "+ r.getString(R.string.minutes_abbr);
  }
}

public static String describeMinutes ( Context context , int minutes ) { Resources r = context . getResources ( ) ; if ( minutes < 60 ) { return String . valueOf ( minutes ) + " " + r . getString ( R . string . minutes_abbr ) ; } else { int hours = minutes / 60 ; int mins = minutes % 60 ; if ( mins == 0 ) { return String . valueOf ( hours ) + " " + r . getString ( R . string . hours_abbr ) ; } return String . valueOf ( hours ) + " " + r . getString ( R . string . hours_abbr ) + " " + String . valueOf ( mins ) + " " + r . getString ( R . string . minutes_abbr ) ; } }
format minutes as " h hrs m mins " or " m mins " if less than an hour .
