I'm developing a web application for Firefox OS, and I need to get the MSISDN. I'm using a privileged app.
here is my manifest :
{
"version": "0.1",
"type": "privileged",
"permissions": {
"mobileid": {
"description": "Needed for MSISDN"
}
},
"name": "My app",
"description": "My app",
"launch_path": "/index.html",
"icons": {
"16": "/assets/icons/icon16.png",
"48": "/assets/icons/icon48.png",
"128": "/assets/icons/icon128.png"
},
"developer": {
"name": "YasserB.",
"url": ""
},
"default_locale": "fr"
}
I'm using firefox OS Mobile id permission.
and I'm using that code to get the MSISDN
var msisdn = navigator.mozMobileConnection.iccInfo.msisdn;
i'm getting an error :
TypeError: navigator.mozMobileConnection is undefined
You are not using the MobileID API, but the MobileConnection one (which btw is for certified apps only) in your code.
Adding the
mobileidpermission to your manifest you should be able to callnavigator.getMobileIdAssertion(). Note that this API requires the user to accept sharing the phone number with your application.