Gaia/Settings/docs/Apn Settings: Difference between revisions

From MozillaWiki
< Gaia‎ | Settings‎ | docs
Jump to navigation Jump to search
(Created page with "APN settings are used for configuring various type of connections including data, message, gps, tethering, and ims. An apn item represents one setting but can be used for mult...")
 
No edit summary
Line 1: Line 1:
APN settings are used for configuring various type of connections including data, message, gps, tethering, and ims. An apn item represents one setting but can be used for multiple types of connection at the same time.
APN settings are used for configuring various type of connections including data, message, gps, tethering, and ims. An APN item represents one setting but can be used for multiple types of connection at the same time. An APN settings looks like the following:


The default apn setting is set based on '''GAIA_FOLDER/shared/resources/apn.json''' upon detecting a new sim card in system app. In addition to the default apn settings, users can create theirs, or install one from client provisioning messages sent from the carrier. The group of apn settings panels allows users to create and edit apn items. Users are able to see all available apn items and pick one for each type of connections.
{
  "carrier": "T-Mobile Internet",
  "apn": "internet",
  "authtype": "1",
  "type": ["default","supl"]
}


In order to make gecko use the apn setting, it must be stored under the field '''ril.data.apnSettings'''. Note that not only settings app can change the apn setting but also system app and wappush app (when receiving client provisioning messages). That being said, settings app should match the value of '''ril.data.apnSettings''' to the available apn items in order to display the correct active ones.
The default APN setting is set based on '''GAIA_FOLDER/shared/resources/apn.json''' upon detecting a new sim card in system app. In addition to the default APN settings, users can create theirs, or install one from client provisioning messages sent from the carrier. The group of APN settings panels allows users to create and edit APN items. Users are able to see all available APN items and pick one for each type of connections.


'''ApnSettingsManager''' does the heavy lifting here. When we use '''queryApns#ApnSettingsManager''' to get available apn items, ApnSettingsManger does what we mentioned above and set an '''"active"''' property directly to the returning apn items. In addition to this, it also provides methods for creating, updating, and removing apn items. All apn panels actually use it under the hood.
In order to make gecko use the APN setting, it must be stored under the field '''ril.data.apnSettings'''. Note that not only settings app can change the APN setting but also system app and wappush app (when receiving client provisioning messages). That being said, settings app should match the value of '''ril.data.apnSettings''' to the available APN items in order to display the correct active ones.
 
'''ApnSettingsManager''' does the heavy lifting here. When we use '''queryApns#ApnSettingsManager''' to get available APN items, ApnSettingsManger does what we mentioned above and set an '''"active"''' property directly to the returning APN items. In addition to this, it also provides methods for creating, updating, and removing APN items. All APN panels actually use it under the hood.

Revision as of 03:01, 25 June 2015

APN settings are used for configuring various type of connections including data, message, gps, tethering, and ims. An APN item represents one setting but can be used for multiple types of connection at the same time. An APN settings looks like the following:

{

 "carrier": "T-Mobile Internet",
 "apn": "internet",
 "authtype": "1",
 "type": ["default","supl"]

}

The default APN setting is set based on GAIA_FOLDER/shared/resources/apn.json upon detecting a new sim card in system app. In addition to the default APN settings, users can create theirs, or install one from client provisioning messages sent from the carrier. The group of APN settings panels allows users to create and edit APN items. Users are able to see all available APN items and pick one for each type of connections.

In order to make gecko use the APN setting, it must be stored under the field ril.data.apnSettings. Note that not only settings app can change the APN setting but also system app and wappush app (when receiving client provisioning messages). That being said, settings app should match the value of ril.data.apnSettings to the available APN items in order to display the correct active ones.

ApnSettingsManager does the heavy lifting here. When we use queryApns#ApnSettingsManager to get available APN items, ApnSettingsManger does what we mentioned above and set an "active" property directly to the returning APN items. In addition to this, it also provides methods for creating, updating, and removing APN items. All APN panels actually use it under the hood.