Just wondering, why are you doing it this way, instead of just putting the setRecurringAlarm() method in your MainActivity?
You are just creating an instance of your Alarm activity, and calling a method on it. I dont really see the need for this to be in an extra activity.
Just guessing, but probably using the Alarm activity as a context without it actually being properly launched could be causing the NullPointerException.