This uses AlarmManager to schedule events in a way that ensures the app is woken up (requires whitelisting when in Doze mode to be woken up at the exact time, otherwise there are delays of up to 15 minutes).