Getting MCC, MNC and Device model in Nokia Asha Web Apps 2.0 Beta
This article explains how to obtain MCC, MNC and Device model in Nokia Asha Web Apps 2.0 Beta
Article Metadata
Code Example
Tested with
Compatibility
Article
Contents |
Overview
One of the new interesting features of Nokia Browser 2.0 for Series 40, is ability to access Mobile Country Code (MCC), Mobile Network Code (MNC) and Device model via JavaScript API. MCC / MNC tuplet can be used to identify mobile phone carrier. MNC list can be found from Wikipedia. However, in Nokia Asha Web Apps, more likely use case is to only use MCC to detect from which country the user is coming. When country is known, locally relevant data or focused advertisements can be offered to end user. MCC does only tell the country where the user is coming, if you need to have accurate position information rely to WC3 Geolocation API. Strength of the MCC is that, there is no permission prompts and it is readily available.
API
Nokia Browser 2.0 offers MCC, MNC and Device model information, trough extending Navigator interface.
| New Properties in Navigator object | |
|---|---|
| deviceModel | Returns device model e.g X3-02 |
| homeCountry | Returns Mobile Country Code, MCC |
| homeCarrier | Returns Mobile Network Code, MNC |
Code Example
Code below demonstrates how properties can be accessed. To see how MCC can be mapped to specific country, check out attached MCCMNC.wgt Web App.
var deviceModel = navigator.deviceModel;
var MCC = navigator.homeCountry;
var MNC = navigator.homeCarrier;



(no comments yet)