I think I'm starting to understand.  When any notification action happens your handler fires, but if the app was closed you need to restart it, encoding the notification as an intent.  Then, when its safe, you can fire all the pending events (after js loads).
Here you only make sure we don't bring the app to front for the close case.  Did I get all that right?

Its good that we can implement the onClosed handler, but its unfortunate that we may need to bootstrap an app to do so.  I wonder if most end users wouldn't just prefer the event not delivered.  Alternatively, is there any way to know whether the app ever registered a listener to onClosed?  If not, maybe we can *not* restart the app in the first place?