The method of installing and managing apps in Firefox OS, Firefox for Android, and Firefox for Desktop is independent of Firefox Marketplace. This opens up the possibility for you to not only self-publish apps, but also to create and host your own marketplace. Ultimately you could also implement an independent marketplace using the open source software. This page describes your options and provides an overview to implementing each.
The three main options you can use to create your own store are:
- Directory method
- Store method
- Full marketplace implementation
These options are described in more detail below.
Note: Apps can be restricted to installation from a list of permitted origins using the
installs_allowed_from manifest property. You'll need to confirm that this property isn't set to exclude your store's origin when listing apps.
Here you create a directory of apps served by the Firefox Marketplace, making use of the Firefox Marketplace API to retrieve information on the apps. You would then need to implement your own Web pages to display details of the apps and trigger their installation. With this method you can serve any app that is available on Firefox Marketplace, but you won't generate a revenue stream for paid apps.
You can find an example of this method of store creation in TheCount. In the app's details pages you'll see an install button directly below the title, as shown below.
You can find an example of this method of store creation in TheCount. To see the example in action click apps with at least 30 ratings then click any of the listed apps' names to open their detail pages. Here you'll see an install button directly below the title, and much more information besides.
You can find the code used to implement the button in the project's GitHub repository.
Here you work independently of the Firefox Marketplace providing a list of self-published apps that are installed using
Apps.installPackage. The self-published apps can either be hosted by you or another developer. This method limits you to apps that can be self-published, that is, you cannot serve Packaged Apps using Privileged and Internal (Certified) APIs.
Full marketplace implementation
Here you implement the various components of marketplace (zamboni plus other components such as Solitude and WebPay, if you want to implement payments). For more information, please see the zamboni documentation.
When implementing the directory or store methods, you'll find the following APIs of use.
Interacting with marketplace
When using the directory method you'll need to access and use details of the apps available in the Marketplace. The key APIs for these tasks are:
- App lists —
GET /api/v1/apps/search/— this API enables you to get a list of Marketplace apps based on a query string, similar to the query strings you see when searching the Web version of marketplace.
- App's details —
GET /api/v1/apps/app/— this API enables you to get the details of an individual app, such as its author and icons.
To find more information on these APIs and others that might be useful, please see the Firefox Marketplace API documentation.
Managing apps on a device
You'll probably be familiar with
Apps.installPackage already, the APIs used to install Packaged Apps and Hosted Apps. These APIs are part of the
For example, the
Apps.getInstalled method enables you to get a list of the apps that were installed in the current user agent by your domain. You'll not see apps installed by other domains, only the ones that you put there. You can use this method to determine whether the user's installed apps match your expectations, or to implement a "resync" feature if the user signs into your site from a new profile.
For more details, please see App Installation and Management APIs.
If you're delivering Hosted Apps, you can easily maintain a session with the user to track preferences, proof-of-purchase, or other additional services. If you're providing services to a remotely Hosted App, you'll need to do some additional work to support a distributed authentication system.