I think this check needs to be in AlarmSetter (consider that AlarmSetter is also triggered on boot) and that MainActivity.onCreate should stay as is.