I have a mobile version of a website, where I ask Firefox OS users whether they 
want to install the app on their Firefox OS device. I do the following, which 
works just fine:

if (!!(navigator.mozApps && navigator.mozApps.installPackage)) {

  var manifestFile = location.protocol + '//' + location.host + 
'/manifest.webapp'
    , request = window.navigator.mozApps.checkInstalled(manifestFile);


  request.onsuccess = function() {

    if (request.result == null) {

etc...

This way, when I start the installed Web app, it doesn't any longer ask me for 
installation, because request.result returns an object, rather than null, which 
will trigger the installation process.

So far, so good.

The problem comes, when I try to install the app from the Firefox Marketplace 
(the app has been approved). No matter what I do, the request result always 
returns null and asks the user to install the app again, when it is already 
installed.

I can provide more info if necessary.

Thanks in advance.
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps

Reply via email to