test to turn on alarm with local notification in the situation of foreground/background