|Firefox OS Apps Run On Android
|Written by Ian Elliot
|Friday, 13 June 2014
A recent Mozilla blog post proclaims: Firefox OS Apps Run On Android - well do they? Not entirely, but Mozilla has managed to be imprecise on the exact situation.
The idea is a good one and Mozilla is working hard on it. But it is failing to provide the information programmers need to work out what is available and what will be available.
Firefox OS uses OWAs as its native apps and as such has to allow for them to be installed and run without a browser in sight. It also has to provide a set of APIs that provide access to the hardware and other privileged services.
What the blog post is about is that now you can install Firefox OS OWAs on Android as if they were native apps. That is, you can take a Firefox OS app and when you install it there will be an icon and it will run and be handled just like a native app. There is one big additional condition - you have to have Firefox for Android installed.
What happens behind the scenes is that when the Firefox OS app launches the Firefox browser provides the runtime environment for it. It runs in a mode that hides its chrome and so, with luck, users are not aware that they are running something that isn't native.
This is great as it provides a much bigger market for OWA/Firefox OS apps. It means you can sit down and write your Firefox OS style app and know that even if the Firefox OS market isn't big enough for you to make a profit, well, you don't have to worry about it because there is always the Android market. Of course the downside is that your users have to install Firefox for Android and most of them have Chrome installed by default - but this is another spin-off advantage for Mozilla.
Why just keep it to Android? You can already apply the same sort of feature to desktop Firefox apps, but you can't pull the same trick for iOS. The reason is that Apple won't let Firefox onto iOS as a native app - it controls the browser you use. It will allow skins on top of the native webkit browser, but you can't make changes to how that underlying system works.
Take a look at this video which gives you an idea of what Mozilla is aiming for:
So you can now run Firefox OS apps on Android?
Firefox OS apps make use of a range of WebAPIs, many of which are non-standard. If your Firefox OS app makes use of any of these then it all depends on whether or not Firefox for Android supports them. Some, especially the standardized APIs, are supported, but the situation regarding some isn't so good. What is more, finding out which are and are not supported isn't easy. There might be a list of which WebAPIs are supported under the latest Firefox for Android, but if so it seems to be well hidden. For example, if you want to use the WebFM API or the Device Storage API then you are out of luck. There are also a lot of "Certified" APIs which can't be used by standard Firefox OS apps that are available to Android apps such as the Bluetooth API, the SMS API, and the WiFi information API to name just three.
It is difficult to work out how compatible Firefox for Android is with Firefox OS and Mozilla provides no easy way to find out. What is clear is that a lot of hardware API are out of bounds for both Firefox OS apps and Firefox OS apps running under Android and this isn't ideal.
More than anything else, Mozilla needs to focus on communicating to programmers the entire situation with respect to what is supported on what. The main table that lists the status of members of the WebAPI suite is out of data and at the moment it is difficult to put your trust in what any of the documentation claims works or doesn't work.
If you don't believe me try finding out the status of the Camera API. This used to be a certified API, which essentially stopped it being used by general apps. In most of the documentation, for example Summary of the API, it is still described as a certified app. It isn't even listed in Firefox OS device APIs, but if you search far enough you will discover that in Firefox OS 2.0 the permission level has been downgraded and any app can use it as long as they ask the user. Nowhere, that I can find, is it status on Firefox for Android provided.
So you can run Firefox OS apps in Android, but the level of compatibility isn't clear.
To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.
or email your comment to: firstname.lastname@example.org
|Last Updated ( Friday, 13 June 2014 )