> 
> I wonder what happens if the app dies? Or when the parent manager
> 
> process dies. Do we have something in place to bring the state back?
> 
> would you have use cases here?
> 

Hi,

for this scenario we don't have use cases - what we need is to call 
mozPushNotifications.register() on boot time - then app can be killed or die by 
itself, that's completely fine.

Following discussion with Fabrice and Jonas, I've re-implemented this to act as 
follows:
1. Certified app declares it's interested in boot-time initialization (by 
adding "install-complete" message and permission.
2. When device boots for the first time, "install-complete" message is 
dispatched to the app.
3. On any subsequent device boots, nothing happens.
Note: This approach is fine by us, because push registrations are persistent 
accross device reboots.

Here's the implementation: https://bugzilla.mozilla.org/show_bug.cgi?id=839058.

The next step (if this code's okay) would be to add install-complete message 
for non-certified apps and/or add boot-time message for every boot, not only 
first one.

Kamil

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to