General
What are preferences?
Some settings are only needed for initial setup, or can not be done in the UI and/or should not be accessible by the user. For this we have the concept of a preference file.
With preferences you can for example: - Add a button to the interface to switch directly from PTV Navigator G2 to your application. We call it the ExtApp button. - Disable the ability to log out via the UI to make sure the license key stays the same. - Prevent users from switching vehicle profiles - ...
What is the structure of the file?
Its a json
How can I export it?
Switch on developer mode by clicking 25x on the build date (Menu -> System -> Build date). Export of preferences is done via Menu->System->Export Preferences (only visible in developer mode).
How can I import it?
The import file must be named preferences_import.json and located in the directory: /sdcard/Android/data/com.ptv.navigation.app/files/ directory.
Restart the application to import it. After the import the file will be deleted. You will see shortly a toast message.
Example: ExtApp button. I want to have a button to switch between the PTV Navigator G2 and my own app:
To display the ExtApp button, the following three preference entries must be imported. A valid preferences_import.json would look like this:
{
"data": [
{"defaultOrValue": "com.axylog.mobileapp.MainActivity", "keyName": "external_app_class", "type": "STRING"},
{"defaultOrValue": "Axylog.png", "keyName": "external_app_icon", "type": "STRING"},
{"defaultOrValue": "com.axylog.mobileapp", "keyName": "external_app_package", "type": "STRING"}
],
"version": 1.0
}
The Ext-App button is displayed in the MainFragment and in the NavigationFragment if the value of the key 'external_app_package' is is not empty.
The icon must be located in the application folder /sdcard/Android/data/com.ptv.navigation.app/files/ + path from 'external_app_icon' and can be of type PNG or Webp. Size of the icon at full HD display resolution: 300x300. If no icon is specified, or the path is incorrect, a default icon will be displayed.
Example: {"defaultOrValue": "com.axylog.mobileapp.MainActivity", "keyName": "external_app_class", "type": "STRING"}, {"defaultOrValue": "Axylog.png", "keyName": "external_app_icon", "type": "STRING"}, {"defaultOrValue": "com.axylog.mobileapp", "keyName": "external_app_package", "type": "STRING"}
In the example, the icon 'Axylog.png' must be in the directory /sdcard/Android/data/com.ptv.navigation.app/files/ directory.
Available Settings
Setup / General settings
License Key import
Import a license key for automated login. The license key will only be imported but not exported.
"keyName": "license_key",
"defaultOrValue": "YourLicenseKey",
"type": "STRING"
Use device language
Either use the Android device language setting, or the language configured in the PTV Navigator G2 setting:
"keyName": "settings_use_device_language",
"defaultOrValue": false,
"type": "BOOLEAN"
Manual language setting
Set your UI language. For this settings_use_devices_language needs to be false. otherwise the PTV Navigator G2 will use the device language setting. Following country codes-locale combinations can be used: af-ZA, ar, eu-ES, bg-BG, ca-ES, zh-CN, zh-TW, cs-CZ, da-DK, nl-BE, nl-NL, en-AU, en-NZ, en-GB, en-US, et-EE, fi-FI, fr-CA, fr-FR, gl-ES, de-DE, el-GR, hr-HR, he-IL, hu-HU, id-ID, it-IT, kk-KZ, lv-LV, lt-LT, ms-MY, nb-NO, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sr-RS, sk-SK, sl-SL, es-ES, sv-SE, th-TH, tr-TR, uk-UA, vi-VN:
"keyName": "settings_language",
"defaultOrValue": "de-DE",
"type": "STRING"
Dark/Light mode - set the App design to dark or to light mode:
"keyName": "settings_theme",
"defaultOrValue": "light",
"type": "STRING"
Skip Intro
If set to true the intro dialogue will not be shown upon startup:
"keyName": "settings_skip_intro",
"defaultOrValue": false,
"type": "BOOLEAN"
Units
Here you can set METRIC for KM & Metric Tons or IMPERIAL for Miles & lbs:
"keyName": "settings_units",
"defaultOrValue": "METRIC",
"type": "STRING"
ExtApp button
Set ExtApp button using your own app icon. You can open your app directly from the PTV Navigator G2:
{
"keyName": "external_app_package",
"defaultOrValue": "",
"type": "STRING"
},
{
"keyName": "external_app_class",
"defaultOrValue": "",
"type": "STRING"
},
{
"keyName": "external_app_icon",
"defaultOrValue": "",
"type": "STRING"
},
Connection Mode
Set the connection mode. Valid value are "online" or "hybrid".
"keyName": "settings_connection_mode",
"defaultOrValue": "online",
"type": "STRING"
Device description request upon startup
We request the device description from the user upon startup. The device description is visible on the backend in the License Key app, in the tab "Devices".
"keyName": "device_description_startup_request",
"defaultOrValue": true,
"type": "BOOLEAN"
Device description edit
Allow the user to change the device description in the settings menu.
"keyName": "settings_device_description_edit",
"defaultOrValue": true,
"type": "BOOLEAN"
Activate/Deactivate safety warner
Allow to completely deactivate the safety warner (with removing Assistant menu entries)
"keyName": "settings_assistant_safety_warner_activated",
"defaultOrValue": true,
"type": "BOOLEAN"
Vehicle profile
Set vehicle profile
Provide the file name of the vehilce profile that is available in the profiles folder of the PTV Navigator G2.
folder of the PTV Navigator G2:
"keyName": "settings_profile",
"defaultOrValue": "truck40.json",
"type": "STRING"
Vehicle profile editing
Enable/disable. Setting this to true will hide the edit and add button for vehicle profiles in the UI.
"keyName": "settings_profile_deny_edit",
"defaultOrValue": true,
"type": "BOOLEAN"
Vehicle profile switching
Setting this to true will disable the possibility of switching vehicle profiles in the UI. Vehicle profiles can still be set by the API.
"keyName": "settings_profile_deny_switch",
"defaultOrValue": true,
"type": "BOOLEAN"
Traffic
Traffic
Activate or deactivate the consideration of traffic:
"keyName": "routing_consider_traffic",
"defaultOrValue": true,
"type": "BOOLEAN"
Traffic delay
What is the minimal traffic delay to trigger a rerouting in order to find a faster route? Range 3 minutes - 30 minutes:
"keyName": "navigation_traffic_delay",
"defaultOrValue": 10,
"type": "INT"
Traffic incidents
Show/hide traffic incidents on the map:
"keyName": "map_show_traffic_incidents",
"defaultOrValue": true,
"type": "BOOLEAN"
Routing
Ferries
Avoid/allow use of ferries:
"keyName": "routing_avoid_ferry",
"defaultOrValue": false,
"type": "BOOLEAN"
Motorways
Avoid/allow use of motorways:
"keyName": "routing_avoid_motorways",
"defaultOrValue": false,
"type": "BOOLEAN"
Toll roads
Avoid/allow use of toll roads:
"keyName": "routing_avoid_toll_roads",
"defaultOrValue": true,
"type": "BOOLEAN"
Unpaved roads
Avoid/allow use of unpaved roads:
"keyName": "settings_routing_avoid_unpaved_roads",
"defaultOrValue": false,
"type": "BOOLEAN"
Tunnels
Avoid/allow use of tunnels:
"keyName": "routing_avoid_tunnels",
"defaultOrValue": false,
"type": "BOOLEAN"
Route optimization
How should the route be optimized? Fast/Distance/Economic
"keyName": "routing_optimization",
"defaultOrValue": "Fast",
"type": "STRING"
User control / Administration
Update check
Enable/disable automatic update check for a newer version of PTV Navigator G2. (available with version >= 9.6.0 )
"keyName": "update_check_enabled",
"defaultOrValue": true,
"type": "BOOLEAN"
Account logout
Enable/disable. Setting this to false will hide the logout button in the license check error screen. After logging out, the user has to enter a valid license key to use Navigator G2 again.
"keyName": "license_error_show_logout_button",
"defaultOrValue": true,
"type": "BOOLEAN"
Mobile data App/APK update
Enable/disable. Setting this to true will allow the APK update over mobile network. Please be aware that the APK file size is > 150MB!
"keyName": "mobile_data_allow_app_update",
"defaultOrValue": false,
"type": "BOOLEAN"
Map download permission
Enable/disable. Setting this to true will allow the map download generally.
"keyName": "map_download_allow_download",
"defaultOrValue": true,
"type": "BOOLEAN"
Map update
Enable/disable. Setting this to true will allow map updates.
"keyName": "map_download_allow_update",
"defaultOrValue": true,
"type": "BOOLEAN"
Map download by iso code
Download maps by their iso codes. The codes must be given as a comma sparated string.
The following country codes can be used:
af,xx_ai,us-al,us-ak,al,dz,ao,ar,ar_no,ar_so, am,au,au-nsw,au_nt,au_qld,au_sa,au_tas,au_vic,au_wa,at,az,bh,bd,by,be,bz,bj,bt,bo,ba, bw,br,br_bap,br_rrg,br_mat,br_msp,br_rjm,br_rss,br_sp,bn,bg,bf,bi,us-ca,kh,cm,ca, ca_ab,ca_bc,ca_mb,ca_no,ca_on,ca_qc,ca-sk,ca_ac,cf,td,cl,cl_no,cl_so,cn,co,cr,ci, hr,cy,cz,cd,dk,dj,ec,eg,sv,gq,er,ee,et,fi,fr,fr_ce,fr_ne,fr_nw,fr_so,fr_sw,gf,ga, gm,ge,de,de_ea,de_nw,de_se,de_sw,de_we,gh,gr,gt,gn,gw,gy,hn,hk,hu,is,in,in_ap,in_br, in_cg,in_dl,in_gj,in_hr,in_jh,in_kl,in_ka,in_mp,in_mhg,in_nes,in_od,in_pb,in_rj, in_ts,in_tn,in_up,in_wb,in_whs,id,id_ce,id_ea,id_we,ir,iq,ie,il,it,it_ce,it_ne, it_nw,it_so,jp,jo,kz,ke,kw,kg,la,lv,lb,lr,ly,lt,lu,mg,mw,my,mv,ml,mt,mr,xx_me,mx, mx_bcs,mx_cea,mx_cwe,mx_chh,mx_dco,mx_mcc,mx_mig,mx_nlt,mx_yea,fm,md,mn,me,ma,mz, mm,na,np,nl,nz,ni,ne,ng,kp,mk,no,pk,pa,py,pe,ph,pl,pf,pt,pr,cg,ro,ru,ru_cc,ru_ea, ru_ce,ru_nw,ru_kv,ru_us,ru_vd,rw,sa,sn,rs,sl,sg,sk,si,so,za,za_ea,za_we,kr,ss,es, es_ne,es_nw,es_so,lk,sd,sr,se,ch,sy,tw,tj,tz,th,th_ea,th_no,th_so,tl,tg,tn,tr, tr_ce,tr_ea,tr_we,tm,ug,ua,ae,gb,gb_ni,gb_no,gb_so,us,us-az,us-ar,us-co,us-ct, us-de,us-dc,us-fl,us-ge,us-id,us-il,us-in,us-ia,us-ks,us-ky,us-la,us-me,us-md, us-ma,us-mi,us-mn,us-ms,us-mo,us-mt,us-ne,us-nv,us-nh,us-nj,us-nm,us-ny,us-nc, us-nd,us-oh,us-ok,us-or,um,us-pa,us-ri,us-sc,us-sd,us-tn,us-tx,us-ut,us-vt,us-va, us-wa,us-wv,us-wi,us-wy,uy,uz,ve,vn,ye,zm,zw
"keyName": "map_download_iso_codes",
"defaultOrValue": "",
"type": "STRING"
Allow connection mode switching
Enable/disable. Setting this to true will allow connection mode switching.
"keyName": "settings_allow_connection_mode_switching",
"defaultOrValue": true,
"type": "BOOLEAN"
Device description request upon startup
We request the device description from the user upon startup.
"keyName": "device_description_startup_request",
"defaultOrValue": true,
"type": "BOOLEAN"
Map delete
Enable/disable. Setting this to true will allow deletion of maps.
"keyName": "map_download_allow_delete",
"defaultOrValue": true,
"type": "BOOLEAN"
Mobile data related
Mobile Map download
Enable/disable. Setting this to true will allow the map download though mobile network (only if the general key Map Download is set to true). Map data is several GB big! (available with version >= 1.0.0)
"keyName": "mobile_data_allow_map_download",
"defaultOrValue": false,
"type": "BOOLEAN"
Connection Mode
Set the connection mode. Valid value are "online" or "hybrid".
"keyName": "settings_connection_mode",
"defaultOrValue": "online",
"type": "STRING"
Mobile data App/APK update
Enable/disable. Setting this to true will allow the APK update over mobile network. Please be aware that the APK file size is > 150MB!
"keyName": "mobile_data_allow_app_update",
"defaultOrValue": false,
"type": "BOOLEAN"
Map display options
Truck restrictions
Show/hide truck restrictions on the map:
"keyName": "map_show_truck_restrictions",
"defaultOrValue": true,
"type": "BOOLEAN"
Hill shade
Show/hide hill shading layer on map:
"keyName": "map_show_hill_shading",
"defaultOrValue": false,
"type": "BOOLEAN"
Dark/Light mode - set the App design to dark or to light mode:
"keyName": "settings_theme",
"defaultOrValue": "light",
"type": "STRING"