On Thu, Mar 7, 2013 at 3:25 PM, viswaprasath <[email protected]> wrote:

> Hi  Developers,
>
> How to get the Device id when i am working on Firefox OS simulator.
> I am currently doing project I would like to use IMEI number as a key for
> encryption. If I get the solution for my question I can demo in Firefox OS
> simulator itself. Currently using Android. There the method is
> getDeviceId()
>

Currently in FirefoxOS Simulator the "IMEI" is not available,
diving into the sources we can found how gaia actually get the imei on
a real device (e.g. in the settings app):

    var req = mobileConnection.sendMMI('*#06#');
    req.onsuccess = function getIMEI() {
      document.getElementById('deviceInfo-imei').textContent = req.result;
    };

Snippet From:
https://github.com/mozilla-b2g/gaia/blob/master/apps/settings/js/about.js#L91

and navigator.mozMobileConnection is available only on certified apps:

https://mxr.mozilla.org/mozilla-central/source/dom/apps/src/PermissionsTable.jsm#117

So even if at some point we can simulate the IMEI retrieval (creating a
simulated
mozMobileConnection), I'm not sure it is a feasible way in your case.

In any case I hope this info can be helpful ;-)

-- 
Luca Greco @ Alca Società Cooperativa
Follow me on http://twitter.com/lucagreco
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps
  • Doubt viswaprasath
    • Re: Doubt Luca Greco

Reply via email to