搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

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

  • 9 个回答
  • 3 人有此问题
  • 4 次查看
  • 最后回复者为 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?

所有回复 (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.