How to Set Alarm Time for Another Day

Simply check the results of the time picker before setting the alarm.

After getting time from time picker. just check with getTimeinMillis() method which gets less than 0. Add some increment value for another day in if conditional clause. Use that result to pass your time for another day

Calendar now = Calendar.getInstance();
Calendar calendar = Calendar.getInstance();
long time = calendar.getTimeInMillis();
if(calendar.before(now)) {
    time +=  86400000L;
}