I am using timepicker to my app,now i am able to set time from timepicker and send it to next activity,now in next activity i am using countdown timer,now in my countdown ti
Here hour1 and min1 are default selected time of dialog..
void setTimeInterval() {
Calendar mcurrentTime = Calendar.getInstance();
int hour1 = mcurrentTime.get(Calendar.HOUR_OF_DAY);
int minute1 = mcurrentTime.get(Calendar.MINUTE);
TimePickerDialog mTimePicker;
mTimePicker = new TimePickerDialog(getActivity(), new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {
// eReminderTime.setText(selectedHour + ":" +
// selectedMinute);
hour = selectedHour;
minute = selectedMinute;
if (hour > 0 || minute > 0) {
sendSettingsTimeInterval();
}
}
}, hour1, minute1, true);// Yes 24 hour time
mTimePicker.setTitle("Select Time Interval");
mTimePicker.show();
}