Added some checking to make sure duplicate notifications aren't fired.
It makes more sense to schedule the notifications when the user is leaving the app