You want to use the navigator.mozMobileNetwork API. You can see an example of it's usage in the wild here:
https://github.com/mozilla/fireplace/blob/master/hearth/media/js/mobilenetwork.js#L263 That will give you the MCC and MNC and some other data. You'll need to request the "mobilenetwork" permission for it to work, which means you'll need to be a privileged app. Hope this helps! ----- Original Message ----- From: [email protected] To: [email protected] Sent: Monday, July 1, 2013 9:08:10 AM Subject: Re: WebAPI Security Discussion: Mobile Connection API I am late to the party on this, only having started Firefox OS development recently, but there's an issue that I've encountered that relates to this API. I would like to have access, from non-certified apps, to the LAC, MNC, MCC, signal strength and Cell ID that are returned by window.navigator.mozMobileConnection. Specifically, if: var conn = window.navigator.mozMobileConnection; then: conn.voice.cell.gsmCellId conn.voice.cell.gsmLocationAreaCode conn.voice.network.mcc conn.voice.network.mnc conn.voice.relSignalStrength These items can be passed to open systems like OpenCellID.org to return an approximate location, and this can be useful when it's not possible to obtain a GPS lock (indoors, for example) if one needs to present a list of nearby points of interest. I've developed an app, getcellid, that shows how this might be done: https://github.com/reinvented/getcellid And I've developed a Foursquare checkin app, checkin, that could use this facility if it were available: https://github.com/reinvented/checkin (right now the app only works outside because that's the only place my Geeksphone Peak can get a GPS lock). I don't dispute the high threat level of other items exposed by this API, but it seems that these data points would be useful to a variety of apps. _______________________________________________ dev-webapps mailing list [email protected] https://lists.mozilla.org/listinfo/dev-webapps _______________________________________________ dev-webapps mailing list [email protected] https://lists.mozilla.org/listinfo/dev-webapps
