CoPilotMgr - CoPilot Cell Data and POIs (CPIK Libraries)
Contents
CopilotMgr.allowCellularDataForGlobalUsage
| Overview | |
|---|---|
| Description | Sets the global configuration for the use of cellular data for CoPilot services that require an internet connection, such as ActiveTraffic. This configuration setting needs to be true before any other cellular data configuration settings can be changed. These settings only configure cellular connections and do not affect the use of Wi-Fi for CoPilot services. Control over the use of cellular data for specific features can be set with the following APIs: allowCellularDataForFeedback, allowCellularDataForMapDownloads, allowCellularDataForNewsAndUpdates, allowCellularDataForSearch, allowCellularDataForSystemFiles,allowCellularDataForTrafficServices |
| Supported on Android Since Version | 9.6.0.821 |
| Supported on iOS Since Version | 10.9 |
| Type | Method |
| Package | com.alk.cpik |
Syntax
Parameters
bEnable – Enables or disables the global use of cellular data.
Sample Code
CopilotMgr.isAllowingCellularDataForGlobalUsage
| Overview | |
|---|---|
| Description | Retrieves the current setting for global cellular data usage, enabled or disabled. This needs to return true before any other cellular data configurations can be changed. |
| Supported on Android Since Version | 9.6.0.821 |
| Supported on iOS Since Version | 10.9 |
| Type | Method |
| Package | com.alk.cpik |
Syntax
Return Value
Boolean - True if CoPilot is using cellular data, false otherwise.
Sample Code
CopilotMgr.allowCellularDataForFeedback
| Overview | |
|---|---|
| Description | Sets whether or not cellular data can be used when providing map data feedback to Trimble Maps. If disabled, users will only be able to provide map data feedback via a Wi-Fi connection. This feature is only available for Trimble’s own data for North America. |
| Supported on Android Since Version | 9.6.0.821 |
| Supported on iOS Since Version | 10.9 |
| Type | Method |
| Package | com.alk.cpik |
Syntax
Parameters
bEnable – Enables or disables the use of cellular data for feedback.
Sample Code
CopilotMgr.isAllowingCellularDataForFeedback
| Overview | |
|---|---|
| Description | Retrieves the current setting from CoPilot of whether or not cellular data is enabled for providing map data feedback to Trimble Maps. This feature is only available for Trimble’s own data for North America. |
| Supported on Android Since Version | 9.6.0.821 |
| Supported on iOS Since Version | 10.9 |
| Type | Method |
| Package | com.alk.cpik |
Syntax
Return Value
Boolean - True if CoPilot is using cellular data for feedback, false otherwise.
Sample Code
CopilotMgr.allowCellularDataForMapDownloads
| Overview | |
|---|---|
| Description | Sets whether or not cellular data can be used to download map data to the device. CoPilot map data is stored locally on a device. Due to the potential size of map data, it is recommended that cellular data use should not be allowed for map downloads without considering the monthly cellular data limits for the device. |
| Supported on Android Since Version | 9.6.0.821 |
| Supported on iOS Since Version | 10.9 |
| Type | Method |
| Package | com.alk.cpik |
Note: Map data sizes vary per region, but can be up to 5 GB.
Syntax
Parameters
Boolean - Set to true to use cellular data for map data downloads, false otherwise.
Sample Code
CopilotMgr.isAllowingCellularDataForMapDownloads
| Overview | |
|---|---|
| Description | Retrieves the current setting from CoPilot of whether or not map data can be downloaded using the cellular network. |
| Supported on Android Since Version | 9.6.0.821 |
| Supported on iOS Since Version | 10.9 |
| Type | Method |
| Package | com.alk.cpik |
Syntax
Return Value
Boolean - True if CoPilot is using cellular data for map downloads, false otherwise.
Sample Code
CopilotMgr.allowCellularDataForNewsAndUpdates
| Overview | |
|---|---|
| Description | Sets whether or not cellular data can be used to retrieve news and updates. News and Updates can be found within the MyCoPilot Menu. |
| Supported on Android Since Version | 9.6.0.821 |
| Supported on iOS Since Version | 10.9 |
| Type | Method |
| Package | com.alk.cpik |
Syntax
Parameters
bEnable – Enables or disables the use of cellular data for news and updates.
Sample Code
CopilotMgr.isAllowingCellularDataForNewsAndUpdates
| Overview | |
|---|---|
| Description | Retrieves the current setting in CoPilot for whether or not cellular data can be used for news and updates. |
| Supported on Android Since Version | 9.6.0.821 |
| Supported on iOS Since Version | 10.9 |
| Type | Method |
| Package | com.alk.cpik |
Syntax
Return Value
Boolean - True if CoPilot is using cellular data for news and updates, false otherwise.
Sample Code
CopilotMgr.allowCellularDataForSearch
| Overview | |
|---|---|
| Description | Sets whether or not cellular data can be used for destination searches using third-party suppliers. Address and point of interest (POI) search is managed locally on the device using the onboard maps, but CoPilot also has plug-ins to third-party suppliers for extra locations and information. These third-party searches require an internet connection. If you disable cellular data for Address and POI searches, it would also be advisable to disable that search menu option in CoPilot. (The feature is likely to be required while the driver is not connected to Wi-Fi.) To do this, please see additional documentation for customizing the CoPilot user interface. |
| Supported on Android Since Version | 9.6.0.821 |
| Supported on iOS Since Version | 10.9 |
| Type | Method |
| Package | com.alk.cpik |
Syntax
Parameters
bEnable – Enables or disables the use of cellular data for searches.
Sample Code
CopilotMgr.isAllowingCellularDataForSearch
| Overview | |
|---|---|
| Description | Retrieves the current setting in CoPilot of whether or not cellular data can be used for destination searches using third-party suppliers. |
| Supported on Android Since Version | 9.6.0.821 |
| Supported on iOS Since Version | 10.9 |
| Type | Method |
| Package | com.alk.cpik |
Syntax
Return Value
Boolean - True if CoPilot is using cellular data for searches, false otherwise.
Sample Code
Related APIs
- CopilotMgr.isActive()
- CopilotMgr.allowCellularDataForGlobalUsage(boolean)
- CopilotMgr.allowCellularDataForSearch
CopilotMgr.allowCellularDataForSystemFiles
| Overview | |
|---|---|
| Description | Sets whether or not cellular data can be used to download the required system files. CoPilot system files include translated text languages as well as voice files used for guidance instructions. |
| Supported on Android Since Version | 9.6.0.821 |
| Supported on iOS Since Version | 10.9 |
| Type | Method |
| Package | com.alk.cpik |
Syntax
Parameters
bEnable – Enables or disables the use of cellular data for system files.
Sample Code
CopilotMgr.isAllowingCellularDataForSystemFiles
| Overview | |
|---|---|
| Description | Retrieves the current setting in CoPilot of whether or not cellular data can be used for downloading required system files. |
| Supported Since Version | 9.6.0.821 |
| Platforms Supported | Android |
| Type | Method |
| Package | com.alk.cpik |
Syntax
Return Value
Boolean - True if CoPilot is using cellular data for system files, false otherwise.
Sample Code
Related APIs
- CopilotMgr.isActive()
- CopilotMgr.allowCellularDataForGlobalUsage(boolean)
- CopilotMgr.allowCellularDataForSystemFiles()
CopilotMgr.allowCellularDataForTrafficServices
| Overview | |
|---|---|
| Description | Sets whether or not cellular data can be used for the CoPilot ActiveTraffic service. CoPilot’s ActiveTraffic service requires a regular connection to the internet. If ActiveTraffic is enabled but this setting is disabled, it will make using the live traffic service inconsistent and unreliable. Using Wi-Fi only is likely to cause breaks in the communication, and traffic data that is older than 15 minutes since the last synchronization is flushed as expired. |
| Supported on Android Since Version | 9.6.0.821 |
| Supported on iOS Since Version | 10.9 |
| Type | Method |
| Package | com.alk.cpik |
Syntax
Parameters
bEnable – Enables or disables the use of cellular data for traffic services.
Sample Code
CopilotMgr.isAllowingCellularDataTrafficServices
| Overview | |
|---|---|
| Description | Retrieves the current setting in CoPilot of whether or not cellular data can be used for the ActiveTraffic service. |
| Supported on Android Since Version | 9.6.0.821 |
| Supported on iOS Since Version | 10.9 |
| Type | Method |
| Package | com.alk.cpik |
Syntax
Return Code Boolean value to retrieve the setting being used for cellular data for traffic services
Sample Code
Related APIs
CopilotMgr.getPOICategories
| Overview | |
|---|---|
| Description | Returns a list of all of the point of interest (POI) categories in CoPilot. |
| Supported on Android Since Version | 9.6.4. |
| Supported on iOS Since Version | 10.9 |
| Type | Method |
| Package | com.alk.cpik |
Syntax
Return Value
List Sample Code
Syntax
Parameters
poiSearchName - The text name of the POI to search for. If left blank, will search all POIs meeting the other criteria.
typeIDs - One or more categories in which to search. IDs can be obtained via CopilotMgr.getPOICategories
stopToSearchNear - A stop representing the location to search near.
radius - The radius around the location for which to search within. Units are miles or kilometers, depending on CoPilot’s unit setting.
maxResults - The maximum number of results to return.
resultCallbacks - A List of POIListener for which to send the onPOISearchResults callback as search results are found.
Sample Code
Syntax
Parameters
String searchName - The text name of the POI to search for. If left blank, will search all POIs meeting the other criteria.
typeID - The category in which to search. IDs can be obtained via CopilotMgr.getPOICategories
maxResults - The maximum number of results to return.
resultCallbacks - A List of POIListener for which to send the onPOISearchResults callback as search results are found.
Sample Code
Syntax
Sample Code
Syntax
Parameters
poiSettings - The POISettings to set in CoPilot.
Sample Code
Syntax
Return Value
POISettings - representing current CoPilot POI alert settings.
Sample Code
Syntax
Parameters
List<POICategory - a list of POICategories that is going to be updated
Sample Code
Methods
JSON Example
JSON Field Explanation
The JSON schema is defined below. All fields not marked as Optional are required.
Syntax
Parameters
String - A string in JSON format with custom POI information
Return Value
PoiIntegrationResult
Sample Code
Values
CopilotMgr.searchPOIsNearLocation
Overview
Description
Searches for points of interest (POIs) in one or more specific categories (such as restaurant, fuel or hotels) near a location. The results of the search are sent to POIListener.onPOISearchResult for each listener passed in and registered with POIListener.
Supported on Android Since Version
9.6.8
Type
Method
Package
com.alk.cpik
CopilotMgr.searchPOIsAlongRoute
Overview
Description
Searches for points of interest (POIs) in one or all categories (such as restaurant, fuel or hotels) along the planned route. CoPilot will search for POIs up to 5 miles away from the planned route. The results of the search are sent to POIListener.onPOISearchResult for each listener passed in and registered with POIListener.
Supported on Android Since Version
9.6.4
Supported on iOS Since Version
10.9
Type
Method
Package
com.alk.cpik
CopilotMgr.cancelPOISearch
Overview
Description
Cancels the point of interest (POI) search that is running following the initial request.
Supported Since Version
9.6.4.
Platforms Supported
Android, Linux
Type
Method
Package
com.alk.cpik
CopilotMgr.setPOIAlertSettings
Overview
Description
Enables or disables point of interest (POI) alerts, see POI Settings. POI alerts are provided to the driver during guidance to inform him or her of specific POI categories. These alerts are received via POIListener.onPOIAlert.
Supported on Android Since Version
9.6.0.
Supported on Android Since Version
10.9
Type
Method
Package
com.alk.cpik
CopilotMgr.getPOIAlertSettings
Overview
Description
Gets settings in relation to POI alerts, see POISettings. These alerts are received via POIListener.onPOIAlert(List).
Supported on Android Since Version
9.6.0.
Supported on iOS Since Version
10.9
Type
Method
Package
com.alk.cpik
CopilotMgr.updatePOICategoriesDisplayStatus
Overview
Description
This API should be used to select the POI categories displayed on the map, for instance, Restaurant, or Gas/Fuel, etc. This has the same function as the tick boxes present on the Currently Displayed POIs screen available through the CoPilot UI. This API should be used in conjunction with UIMgr.setPOIDisplaySetting to manage when these POI categories are displayed.
Please note when using this API all POIs are defaulted to be displayed on the map. As a result, the first call to CoPilot needs to include the categories that you wish to hide. Within POICategory, isDisplayedOnMap can be used to identify the categories that are being shown on the map to determine those which you wish to hide. This can be returned via CopilotMgr.getPOICategories.
Supported on Android Since Version
10.9
Type
Method
Package
com.alk.cpik
POICategory
Overview
Description
Object representing a POI category in CoPilot. Examples of POI categories would be Restaurant, Gas/Fuel, Hotel & Accommodation etc.
Supported on Android Since Version
10.9
Type
Object
Package
com.alk.cpik
Method Name
Return Type
Description
getID()
int
Integer ID for the POI category. This is needed for CopilotMgr.searchPOIsNearLocation and CopilotMgr.searchPOIsAlongRoute
getName()
String
String description of the POI category
isDisplayedOnMap()
boolean
Indicate this POI category is displaying in CoPilot map or not
setDisplayOnMap(boolean)
void
Set this POI category to display or hide in CoPilot map
CopilotMgr.integrateCustomPOIs
Overview
Description
This API is used to draw custom places of interest (POIs) on the map. POIs are grouped into sets and each set is described using the JSON format shown below. You can display POIs on the map using CoPilot’s default icons for each POI category or by adding your own custom icons in the icon field.
Supported on Android Since Version
10.9
Supported on iOS Since Version
10.9
Type
Method
Package
com.alk.cpik
[
{
"Name": "my set name",
"Persist": false,
"Replace": true,
"Categories": [
{
"Name": "Custom Fuel",
"MaxZoomLevel": 4,
"Icon": "fuel", //The default CoPilot icon for fuel
"Options": 21
},
{
"Name": "Custom Restaurant",
"MaxZoomLevel": 4,
"Icon": "restaurant", //The default CoPilot icon for restaurant
"Options": 21
}
],
"Places": [
{
"Address": {
"StreetAddress": "14807 Crain Hwy",
"City": "Clinton",
"Zip": "20735",
"State": "MD",
"County": null
},
"Coords": {
"Lat": "38.6825",
"Lon": "-76.87278"
},
"PlaceName": "My Restaurant",
"CategoryName": "Custom Restaurant",
"Phone": ""
},
{
"Address": {
"StreetAddress": "1720 Route 309",
"City": "Coopersburg",
"Zip": "18036",
"State": "PA",
"County": null
},
"Coords": {
"Lat": "40.50306",
"Lon": "-75.38667"
},
"PlaceName": "My Fuel Stop",
"CategoryName": "Custom Fuel",
"Info": "",
"Phone": ""
}
]
}
]
icon field. For example: To use an icon named coolcustom.png, the icon field should be "Icon": "usr_coolcustom". Alternatively, you can leave this field blank and CoPilot will search for user-provided images within the Region/Save folder, looking for an icon name that matches the category name.
PoiIntegrationResult
Overview
Description
This Enum is the return value of CopilotMgr.integrateCustomPOIs which provides the result of the API call
Supported on Android Since Version
10.9
Supported on iOS Since Version
10.9
Type
Method
Package
com.alk.cpik
Values
Description
SUCCESS
POIs integration is successful
JSON_PARSE_ERROR
Cannot parse the JSON. The JSON is invalid
INVALID_POI_JSON
The JSON is not in a valid format for the integration of POIs, please review the format detailed within CopilotMgr.integrateCustomPOIs
UNKNOWN_ERROR
Unknown Error, please contact ALK support