Confirmed users
100
edits
| Line 51: | Line 51: | ||
SIM card specific customizations are included at build time, but applied at runtime during the First Time Usage experience, or when a SIM card is inserted for the first time. | SIM card specific customizations are included at build time, but applied at runtime during the First Time Usage experience, or when a SIM card is inserted for the first time. | ||
== Buildtime Customization == | == Buildtime Customization (gaia/distribution) == | ||
=== power/ === | |||
=== power/ === | |||
Custom power on/off animations (or static images) are included here. Files can be MP4 for animations or PNG for static images. | Custom power on/off animations (or static images) are included here. Files can be MP4 for animations or PNG for static images. | ||
| Line 74: | Line 73: | ||
=== wallpapers/ === | === wallpapers/ === | ||
Custom wallpapers (PNG files) should be included here and listd in list.json. | |||
=== | === calendar.json === | ||
Calendar provider information. Specifying your own Google Oauth credentials is required. | Calendar provider information. Specifying your own Google Oauth credentials is required. | ||
Calendar CalDav API access is needed, which is only available for whitelisted developers. API usage is limited to 1,000,000 requests/day. | |||
If vendors want to use their account to generate the API key, they need to apply using this form first to get access to the Calendar CalDav API: https://developers.google.com/google-apps/calendar/caldav | |||
they need to | |||
https://developers.google.com/google-apps/calendar/caldav | |||
After your account is whitelisted by Google, vendors are able to get a key for the Calendar CalDav API. | |||
Steps: | Steps: | ||
1. ( | 1. (Using OEM's account) Open the API console: | ||
https://code.google.com/apis/console/b/0 | https://code.google.com/apis/console/b/0 | ||
2. | 2. Create a project and enable `Calendar CalDAV API` in the `Service` tab. | ||
3. | 3. Click on the `API Access` tab. | ||
4. | 4. Click on `Create an OAuth 2.0 client ID`, Add Product name & logo (will be shown in the Google Calendar authentication page) | ||
5. | 5. Set `Application type` to `Installed application`, `Other`, then create the key. | ||
6. Click ` | 6. Click `Edit settings` and change `Authorized Redirect URIs` to 'https://oauth.gaiamobile.org/authenticated' | ||
change `Authorized Redirect URIs` to 'https://oauth.gaiamobile.org/authenticated' | |||
7. | 7. Change `Client ID` and `Client Secret` to the id (client_id) and secret (client_secret) used in the `calendar.json` file. | ||
=== contacts === | === contacts.json === | ||
Contacts listed here will be included in the phone's contacts database. For SIM-card dependent customizations, see the Runtime Customization section. See the [https://wiki.mozilla.org/WebAPI/ContactsAPI Contacts API page] for details on the layout of Contacts objects. Here's an example contacts.json file: | |||
[ | |||
{ | |||
"name": ["John Doe"], | |||
"givenName": ["John"], | |||
"familyName": ["Doe"], | |||
"nickname": ["Johnny"], | |||
"category": ["Work", "Racing Team"], | |||
"bday": "1980-06-01", | |||
"email": [ | |||
{ | |||
"type": ["personal"], | |||
"value": "john.doe@example.org", | |||
"pref": true | |||
}, | |||
{ | |||
"type": ["work"], | |||
"value": "jdoe@example.com" | |||
} | |||
], | |||
"adr": [ | |||
{ | |||
"type": ["personal"], | |||
"streetAddress": "123 Foopy St.", | |||
"locality": "San Francisco", | |||
"region": "Downtown", | |||
"postalCode": "94030", | |||
"countryName": "US" | |||
} | |||
] | |||
}, | |||
{ | |||
"name": ["CarrierX"], | |||
"email": [ | |||
{ | |||
"type": ["work"], | |||
"value": "support@carrierx.com", | |||
} | |||
], | |||
"url": [ | |||
{ | |||
"type": ["work"], | |||
"value": "https://www.carrierx.com" | |||
} | |||
] | |||
} | |||
] | |||
=== | === homescreens.json === | ||
Use this file to define what apps to show in the homescreens, and in which order. For example: | |||
{"homescreens": [ | |||
[ | |||
["apps", "communications", "dialer"], | |||
["apps", "sms"], | |||
["apps", "browser"], | |||
["apps", "camera"] | |||
] | |||
]} | |||
=== network | === network.json (not in customization folder) === | ||
Set supported network types of the device. Firefox OS supports the following types: | Set the supported network types of the device. Firefox OS supports the following types: | ||
* 'wcdma/gsm' (WCDMA preffered) | * 'wcdma/gsm' (WCDMA preffered) | ||
* 'gsm' | * 'gsm' | ||
| Line 132: | Line 175: | ||
ex: {"types": ["cdma/evdo", "cdma", "evdo"]} | ex: {"types": ["cdma/evdo", "cdma", "evdo"]} | ||
=== sensors === | === sensors.json === | ||
sensor capabilities | Define sensor capabilities of the device. By default it is: | ||
{ "ambientLight": true } | |||
=== settings === | === settings.json === | ||
Set default wallpaper/ringtones, lockscreen enable/disable, bluetooth on/off, etc. | |||
=== sms-blacklist === | === sms-blacklist === | ||
Custom SMS blocklist, blocks senders in this file. Will overwrite blacklist.json file in the SMS app. | |||
=== cellbroadcast === | === cellbroadcast === | ||
| Line 157: | Line 201: | ||
Default settings are available in [https://mxr.mozilla.org/gaia/source/shared/resources/apn/operator_variant.xml operator_variant.xml]. | Default settings are available in [https://mxr.mozilla.org/gaia/source/shared/resources/apn/operator_variant.xml operator_variant.xml]. | ||
=== support === | === support.json === | ||
Support contacts (include online support & tel support). Will overwrite support.json in the Settings app. | |||
Note | Note that these customization will overwrite the default settings, so if you want to keep default settings and add some extra resources, you should copy those settings from the built-in apps and add your own customization upon them. | ||
Following is an example: | Following is an example: | ||
| Line 181: | Line 225: | ||
} | } | ||
The build script is in [https://github.com/mozilla-b2g/gaia/blob/master/build/applications-data.js build/applications-data.js] | The build script is in [https://github.com/mozilla-b2g/gaia/blob/master/build/applications-data.js build/applications-data.js] | ||