Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Can a Mozilla Marketplace app target just Firefox OS devices due to use of background service page

  • 9 replies
  • 3 have this problem
  • 4 views
  • Last reply by mattbasta

more options

I'm writing a Firefox OS app that makes use of the background_page (background service) part of the app manifest and integral to the app working. So this won't work on a Firefox Mobile or Desktop version. Is there a way to submit an app that just gets targeted to devices that support background services?

I'm writing a Firefox OS app that makes use of the background_page (background service) part of the app manifest and integral to the app working. So this won't work on a Firefox Mobile or Desktop version. Is there a way to submit an app that just gets targeted to devices that support background services?

All Replies (9)

more options

I am aware that in the market place submission I can choose from:

  • Desktop
  • Mobile
  • Tablet

But that means version of firefox and not if it is Firefox OS or any indication of support for background services.

more options

Currently, you must be building a certified app in order to take advantage of background pages. Certified apps are reserved for built-in Firefox OS apps at the moment, which means that you won't be able to distribute your app via the Firefox Marketplace.

Additionally, Firefox OS is the only platform which implements background pages, and is also the only platform which can run packaged apps (required for certified apps).

See here for more information on the current list of app permissions:

https://docs.google.com/spreadsheet/ccc?key=0Akyz_Bqjgf5pdENVekxYRjBTX0dCXzItMnRyUU1RQ0E#gid=0

more options

Ok thanks very much for the information. Probably got to abandon my app which was a "find my device" and security app. I was under the impression when I started work on it (quite a few months ago, admittedly b2g was early in development) that the platform was more open for apps allowing:

  • Showing "alert" screens
  • Taking photos
  • Get SIM info (if someone stole the phone and changed the SIM card)
  • Play a "siren" sound

The main idea being any of these could be requested and processed in a background service, for instance returning the geolocation so a map can be shown to the owner in a desktop web app.

The push notifications API always shows a notification to the user (similar to Apple) rather then the Google Cloud Messaging approach of having the app respond to an event in the background, which would have helped me round the problem.

Oh well.

Thanks again for the info.

more options

Is this expected to change? It seems incredibly necessary for a wide variety of non-critical tasks (and two of my in-progress apps).

more options

If I understand the situation, it's not that we can't make applications which use these priveleged APIs. I'm also working on an application which will be a media server (and will need to run in the background). The limitation is that our apps won't be able to get distributed from the Firefox Marketplace.

Another thing to keep in mind is WebRT, and the promise of being able to install these openwebapps in various operating systems as if they were just another app. This type of functionality would obviously need to have the same functionality of other apps on the system.

more options

No, that's incorrect. Certified apps cannot be run or deployed by anyone except cell phone carriers or Mozilla themselves. You could not distribute the apps even from your own site. The APIs that you're looking to use cannot be used outside of certified apps, and thus aren't suitable for use.

This will likely get loosened in the future, but I have no ETA for how long that will take.

more options

Hmm... that's unfortunate. It makes me wonder if the B2G source could be modified to allow access to these APIs. The amount of knowledge required to do that is likely more trouble to obtain than waiting for an official release of these APIs.

In spite of their current status, I would be very surprised if these APIs aren't released for public use in the future.

more options

https://wiki.mozilla.org/Apps/Security#Out_of_scope_for_1.0

This link provides a little more information... access to these APIs is not planned at all. I may need to rethink what permissions are needed for my app and how it will work. From the link:

"We have no plans to support 3rd party apps as certified apps."

more options

If you're interested:

https://mxr.mozilla.org/mozilla-central/source/dom/apps/src/PermissionsTable.jsm

Rather than allow 3rd party apps to become certified, the plan for future versions of b2g (to the best of my understanding) is to loosen the permissions and allow privileged apps to obtain some of the permissions that only certified apps are currently allowed to use.