How to detect Firefox web apps support in mobile
var isFFOS = (!!"mozApps" in navigator && navigator.userAgent.search("Mobile") != -1);
Written by Ismael González
Related protips
4 Responses
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/104781/85267482d7e09090d8f945bded948635.jpg)
If you try it on a Mozilla Firefox navigator on an Android phone It returns true.
I also add (navigator.userAgent.search("Android")<0) into the condition to solve it.
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/65145/1b9603a9c41218574cea992367b97474.png)
Thx @mare for the tip, but this is actually the real intention, as you can install FFOS applications from Firefox for Android
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/104781/85267482d7e09090d8f945bded948635.jpg)
I'm really sorry but when I read the post title I understood that you are detecting a FirefoxOS system from among all systems, because behavior is not always the same.
Well, If someone else had my same confusion and really want to discriminate between a FirefoxOS system and anything else, I want to recommend changing my previous condition with this one. (!!navigator.mozId).
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/65145/1b9603a9c41218574cea992367b97474.png)
I've changed the title of the protip, as what i really want to show here is how to detect if a device is capable of accepting a firefox application package, which could be Android and FirefoxOS devices.
Thx anyway @marti1125 !!