Hi!

We have a following usecase: certified app which allows for over-the-air apps 
installation.

App operates as follows:
1. Registers for push.
2. When push is received, app fetches manifest's URL from server.
3. Apps calls mozApps.install(manifest_url).

Requirements: 
- app has no UI.
- app uses SimplePush API.
- we should develop it sooner that end of year ;)

Problem: since app has no UI, user will never launch it, thus making it 
impossible for it to call mozPushNotifications.register().

Possible solutions we came up with Jonas, Vivien, Fabrice and Doug:

1. Modify system app (ie. add widget similar to cost control) which would 
reigster for push. This is a bad solution: widgets are not well designed, and 
it does not really make sense to modify system app for this use case.

2. Use background scripts which would register for pushes. I'm not sure at this 
point whether it's a good idea (performance?). Plus background services will 
not land until end of year, possibly (which is late for us).

3. Use regular messages to wake up selected apps during boot-time. Those apps 
would need to have "bootcomplete" permission (possibly only certifed apps could 
do that). This solution is drafted in this bug: 
https://bugzilla.mozilla.org/show_bug.cgi?id=839058 and it's similar to 
Android's BOOT_COMPLETED broadcast.


Which way is best to go from here?
What are the pros & cons of solutions 1-3? Do you see any other way we can do 
that?

Hope to see some discussion here ;)
Kamil
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to