benbahrenburg/benCoding.AlarmManager — pull request #8 by kwcoffman (2013-01-25 15:25:21+00:00)
Title: Allow notifications to be delivered if there is no active activity

This allows Alarms to be re-created after a device reboot, and
notifications delievered if there is not currently an active
Activity for the app.

Some history:

Alarms dont't survive a reboot. To get around this, we have a
module that adds a BOOT_COMPLETED receiver -- which starts a
service at boot time to re-create the alarms.
(See https://support.appcelerator.com/tickets/APP-539342)

However, if the app itself is not manually started after the reboot,
there is never an active activity. The call to getRootOrCurrentActivity()
in showNotification() returns null and a NullPointerException
occurs (and the notification is never delivered.)

This patch adds the ability for the app to pass in the class name
of the activity that should be started when the notification is
delivered. If no name is passed in, the old default behavior is
used.