Skip to content

GuidanceMgr

Overview
Description A class containing static methods for obtaining navigational information such as location, road info, and the location of road safety cameras.
Supported on Android Since Version 9.6.0.821
Supported on iOS Since Version 10.9
Type Class
Package com.alk.cpik.guidance

Methods

Method Name Return Type Description
getCurrentRoad() Road Gets information about the current road.
getRouteCoordinates(boolean, double, double) ArrayList<​Coordinate> Retrieves a list of latitude / longitude coordinates for the current route.
getRouteTmcCodes() ArrayList<​String> Retrieves a list of TMC location codes along the current route.
getRouteTmcCodes(boolean) ArrayList<​String> Retrieves a list of TMC location codes along the current route.
getTurnInstruction (boolean) TurnInstruction Gets the upcoming turn instruction.
getLaneAssist() LaneAssistInfo Gets the current lane assist information.
getCurrentSafetyCamera() SafetyCamera Gets safety camera information.
getGPSDevice() GPSDevice Gets the CoPilot GPS Device to manually push GPS coordinates or NMEA sentences.
getCurrentPosition() PositionInfo Obtains a variety of data pertaining to CoPilot's current or last known position including.
getETA() Date Obtains the current Estimated Time of Arrival for the first destination of the trip.
getDistanceToDestination() Double Gets the distance from CoPilot's current position (map-snapped) to its destination.
setChevronDisplaySetting(ChevronDisplayType) Void Sets display type for the chevron that represents the current position on the map.
getChevronDisplaySetting() ChevronDisplayType Returns display type for the map chevron.
enableEarlyTurnWarning() Void Enables/Disables the turn warning at 2 KM or 2 Miles.
disableEarlyTurnWarning() Void Enables/disables early turn warning.
isEarlyTurnWarningEnabled() Boolean Returns whether the 2 KM or 2 Mile turn warning is enabled.
enableFarTurnWarning() Void Enables/Disables the turn warning at 1 KM or 1 Mile.
disableFarTurnWarning() Void Disables the 1 KM or 1 Mile turn warning. (Available only till CP 9.6.8)
isFarTurnWarningEnabled() Boolean Returns whether the 1 KM or 1 Mile turn warning is enabled.
enableNearTurnWarning() Void Enables/Disables the turn warning at .5 KM or .5 Mile.
disableNearTurnWarning() Void Disables the .5 KM or .5 Mile turn warning. (Available only till CP 9.6.8.)
isNearTurnWarningEnabled() Boolean Returns whether the .5 KM or .5 Mile turn warning is enabled.
enableTurnRestrictions(boolean) Void Sets whether turn restrictions will be displayed during navigation.
enableClearTurnView(boolean) Void Sets whether clear turn view is enabled only on highways.
enableClearTurnViewOnlyHighways(boolean) Void Sets whether clear turn view is enabled only on highways.
setClearTurnInstructionDrawDistance(int) Void Sets when clear turn instructions will be drawn in 1/10 KM/Miles.
setClearTurnInstructionDrawDistance(int) Void Sets when clear turn instructions will be drawn in 1/10 KM/Miles.
setClearTurnInstructionHideDistance(int) Void Sets when clear turn instructions will be hidden in 1/10 KM/Miles.
showTurnAfterNext(boolean) Void Sets whether the second turn ahead on the trip will be drawn.
isTurnRestrictionEnabled() Boolean Returns whether turn restrictions will display during navigation.
isClearTurnViewEnabled() Boolean Returns whether clear turn view is enabled.
isClearTurnViewEnabledOnlyForHighways() Boolean Returns whether clear turn view is enabled only on highways.
getClearTurnInstructionDrawDistance() Int Returns the distance at which clear turns are displayed in 1/10 KM/Miles.
getClearTurnInstructionHideDistance() Int Returns the distance at which clear turns are hidden in 1/10 KM/Miles.
isTurnAfterNextEnabled() Boolean Returns whether the second turn ahead on the trip will be drawn.
suspendNavigation(Boolean) Void Suspends navigation. When this API is called, the position on the map will not update and guidance will stop until re-enabled.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GeocodingException

Overview
Description Exception thrown when there has been a Geocoding error.
Supported on Android Since Version 9.6.0.821
Type Object
Package com.alk.cpik.guidance

Methods

Method Name Description
GeocodingException() A default constructor.
GeocodingException(String detailMessage, List<​PlaceError> placeList, List<​AddressError> addressList) Overloading constructor with different error type parameters.
GeocodingException(String detailMessage, Throwable throwable) Overloading constructor with different parameters.
GeocodingException(String detailMessage) Overloading constructor with single string parameters.
GeocodingException(Throwable throwable) Overloading constructor with single throwable parameters.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceException

Overview
Description Exception thrown when there has been an error executing Guidance operations such as turn warnings.
Supported on Android Since Version 9.6.0.821
Type Object
Package com.alk.cpik.guidance

Methods

Method Name Description
GuidanceException() A default constructor.
GuidanceException(String detailMessage, Throwable throwable) Overloading constructor with different parameters.
GuidanceException(String detailMessage) Overloading constructor with single string parameters.
GuidanceException (Throwable throwable) Overloading constructor with single throwable parameters.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceSettings

Overview
Description Class that contains ways to edit and retrieve CoPilot settings related to Guidance.
Supported on Android Since Version 9.6.0.821
Type Class
Package com.alk.cpik.guidance

Methods

Method Name Return Type Description
isSpeedAlertEnabled() Boolean Returns whether or not an alert should appear when the driver is exceeding the speed limit by a given threshold.
setSpeedAlert(boolean) Void Sets whether or not an alert should appear when the driver is exceeding the speed limit by a given threshold.
isSpeedAlertAudioEnabled() Boolean Returns whether or not an audio alert is played when the driver is exceeding the speed limit by a given threshold.
setSpeedAlertAudio(boolean) Void Sets whether or not an audio alert is played when the driver is exceeding the speed limit by a given threshold.
isSpeedLimitOnMap() Boolean Returns whether or not the speed limit is being shown on the map.
setSpeedLimitOnMap(boolean) Void Sets whether or not to show the speed limit on the map.
getSpeedLimitThreshold() SpeedThreshold Gets the amount over the speed limit the driver can travel before receiving a speed limit warning.
setThreshold(SpeedThreshold) Void Sets when speed limit warnings appear.
isSafetyCameraAlertEnabled() Boolean Returns whether or not safety camera alerts are enabled.
setSafetyCameraAlert(boolean) Void Enables or disables safety camera alerts.
getSafetyCameraAlertRange() SafetyCameraAlertRange Gets how far in advance a driver is warned about an approaching safety camera.
setSafetyCameraAlertRange(SafetyCameraAlertRange) Void Sets how far in advance a driver is warned about an approaching safety camera
getMapMode() MapMode Gets the current day-night mode of the map.
setMapMode(MapMode) Void Sets CoPilot's map scheme to selected background. The map is refreshed.
setDistanceToSayTurnNow(int) Void Sets the distance ahead of the turn where CoPilot should speak its "Turn Now" announcement.
getDistanceToSayTurnNow() int Gets the currently set distance ahead of a turn at which CoPilot will speak its "Turn Now" announcement.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceSettings.isSpeedAlertEnabled

Overview
Description Returns whether or not an alert should appear when the driver is exceeding the speed limit by a given threshold.
Supported on Android Since Version 9.6.0.821
Type Method
Package com.alk.cpik.guidance

Syntax

boolean getSpeedLimitAlertEnabled()

Return Value

Boolean - True if enabled, false if disabled.

Sample Code

// Print whether or not an alert will appear when the driver is exceeding the speed limit
boolean speedAlertEnabled = GuidanceSettings.isSpeedAlertEnabled();

if (speedAlertEnabled)
  System.out.println("Alerts will be given when the driver exceeds the speed limit");
else
  System.out.println("Alerts will NOT be given when the driver exceeds the speed limit");

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceSettings.setSpeedAlert

Overview
Description Toggles whether or not alerts will appear when the driver is exceeding the speed limit by a given threshold.
Supported on Android Since Version 9.6.0.821
Platforms Supported Android, Linux
Type Method
Package com.alk.cpik.guidance

Syntax

static void enableSpeedLimitAlert(boolean)

Parameters

boolean speedAlertEnabled - True to enable, false to disable.

Return Value

Void

Sample Code

// Enable alerts when exceeding the speed limit
GuidanceSettings.setSpeedAlert(true);

// Disable alerts when exceeding the speed limit
GuidanceSettings.setSpeedAlert(false);

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs

  • GuidanceSettings.isSpeedAlertEnabled()
  • GuidanceSettings.isSpeedAlertAudioEnabled()
  • GuidanceSettings.setSpeedAlertAudio()
  • GuidanceSettings.isSpeedLimitOnMap()
  • GuidanceSettings.setSpeedLimitOnMap()
  • GuidanceSettings.getSpeedLimitThreshold()
  • GuidanceSettings.setThreshold()

GuidanceSettings.isSpeedAlertAudioEnabled

Overview
Description Returns whether or not an audio alert should play when the driver is exceeding the speed limit by a given threshold.
Supported on Android Since Version 9.6.0.821
Type Method
Package com.alk.cpik.guidance

Syntax

static boolean getSpeedLimitAudioAlertEnabled()

Parameters

None

Return Value

boolean - True if enabled, false if disabled.

Sample Code

// Print whether or not an audible alert will sound when the driver is exceeding the speed limit
boolean soundAlert = GuidanceSettings.isSpeedAlertAudioEnabled();
if (soundAlert)
  System.out.println("Audio alerts will sound when the driver exceeds the speed limit");
else
  System.out.println("Audio alerts will NOT sound when the driver exceeds the speed limit");

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs

  • GuidanceSettings.isSpeedAlertEnabled()
  • GuidanceSettings.setSpeedAlert()
  • GuidanceSettings.setSpeedAlertAudio()
  • GuidanceSettings.isSpeedLimitOnMap()
  • GuidanceSettings.setSpeedLimitOnMap()
  • GuidanceSettings.getSpeedLimitThreshold()
  • GuidanceSettings.setThreshold()

GuidanceSettings.setSpeedAlertAudio

Overview
Description Toggles whether or not to play an audio alert when the driver is exceeding the speed limit by a given threshold.
Supported on Android Since Version 9.6.0.821
Platforms Supported Android, Linux
Type Method
Package com.alk.cpik.guidance

Syntax

void enableSpeedLimitAudioAlert(boolean)

Parameters

boolean alertEnabled - True to enable, false to disable.

Sample Code

// Enable audible alerts when exceeding the speed limit
GuidanceSettings.setSpeedAlertAudio(true);
// Disable audible alerts when exceeding the speed limit
GuidanceSettings.setSpeedAlertAudio(false);

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs

GuidanceSettings.isSpeedAlertEnabled() GuidanceSettings.setSpeedAlert() GuidanceSettings.isSpeedAlertAudioEnabled() GuidanceSettings.isSpeedLimitOnMap() GuidanceSettings.setSpeedLimitOnMap() GuidanceSettings.getSpeedLimitThreshold() GuidanceSettings.setThreshold()


GuidanceSettings.isSpeedLimitOnMap

Overview
Description Returns whether or not the speed limit is being shown on the map.
Supported on Android Since Version 9.6.0.821
Type Method
Package com.alk.cpik.guidance

Syntax

static boolean isSpeedLimitOnMap()

Parameters

None

Return Value

boolean - True if shown, false if hidden

Sample Code

// Print whether or not the speed limit will display on the map
boolean speedLimitOnMap = GuidanceSettings.isSpeedLimitOnMap();
if (speedLimitOnMap)
  System.out.println("Speed limit will be displayed on map");
else
  System.out.println("Speed limit will NOT be displayed on map");

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs

GuidanceSettings.isSpeedAlertEnabled() GuidanceSettings.setSpeedAlert() GuidanceSettings.isSpeedAlertAudioEnabled() GuidanceSettings.setSpeedAlertAudio() GuidanceSettings.setSpeedLimitOnMap() GuidanceSettings.getSpeedLimitThreshold() GuidanceSettings.setThreshold()


GuidanceSettings.setSpeedLimitOnMap

Overview
Description Sets whether or not to show the speed limit on the map.
Supported on Android Since Version 9.6.0.821
Type Method
Package com.alk.cpik.guidance

Syntax

void enableShowSpeedLimitOnMap(boolean)

Parameters

boolean showSpeedLimitOnMap - True to show, false to hide.

Return Value

Void

Sample Code

// Set the speed limit to display on the map
GuidanceSettings.setSpeedLimitOnMap(true);
// Set the speed limit to NOT display on the map
GuidanceSettings.setSpeedLimitOnMap(false);

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs

GuidanceSettings.isSpeedAlertEnabled() GuidanceSettings.setSpeedAlert() GuidanceSettings.isSpeedAlertAudioEnabled() GuidanceSettings.setSpeedAlertAudio() GuidanceSettings.getSpeedLimitThreshold() GuidanceSettings.setThreshold()


GuidanceSettings.getSpeedLimitThreshold

Overview
Description Returns the speed the driver must exceed before a speed limit warning appears in CoPilot.
Supported on Android Since Version 9.6.0.821
Type Method
Package com.alk.cpik.guidance

Syntax

static SpeedLimitWarningThreshold getSpeedLimitWarningThreshold()

Parameters

None

Return Value

SpeedLimitWarningThreshold – An Enum indicating the speed which must be reached in miles per hour before the speed limit warning is provided.

Sample Code

// Print out the current threshold for which speed limit alerts will be sent
GuidanceSettings.SpeedThreshold threshold = GuidanceSettings.getSpeedLimitThreshold();
String unitString = "";
try {
  if (CopilotMgr.getUnitsOfMeasure() == UnitsOfMeasure.METRIC)
    unitString = "KPH";
  else if (CopilotMgr.getUnitsOfMeasure() == UnitsOfMeasure.IMPERIAL)
    unitString = "MPH";

  switch (threshold) {
    case LEVEL_0:
      System.out.println("Alerts will be shown when the current speed is at least 5 "+ unitString + " higher than the speed limit");
      break;
    case LEVEL_1:
      System.out.println("Alerts will be shown when the current speed is at least 10 " + unitString + " higher than the speed limit");
      break;
    case LEVEL_2:
      System.out.println("Alerts will be shown when the current speed is at least 15 " + unitString + " higher than the speed limit");
      break;
    case LEVEL_3:
      System.out.println("Alerts will be shown when the current speed is at least 20 " + unitString + " higher than the speed limit");
      break;
    case LEVEL_4:
      System.out.println("Alerts will be shown when the current speed is at least 25 " + unitString + " higher than the speed limit");
      break;
    case LEVEL_5:
      System.out.println("Alerts will be shown when the current speed is at least 30 " + unitString + " higher than the speed limit");
      break;
    default:
      break;
  }
} catch (CopilotException e) {
  e.printStackTrace();
}

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs

GuidanceSettings.isSpeedAlertEnabled() GuidanceSettings.setSpeedAlert() GuidanceSettings.isSpeedAlertAudioEnabled() GuidanceSettings.setSpeedAlertAudio() GuidanceSettings.isSpeedLimitOnMap() GuidanceSettings.setSpeedLimitOnMap() GuidanceSettings.setThreshold() GuidanceSettings.setThreshold()


GuidanceSettings.setThreshold

Overview
Description Sets how fast a driver can be over the speed limit before a warning appears in CoPilot.
Supported on Android Since Version 9.6.0.821
Type Method
Package com.alk.cpik.guidance

Syntax

void setThreshold(SpeedThreshold threshold)

Parameters

Threshold - How fast a driver can be over the speed limit before receiving a speed limit warning.

Return Value

Void

Sample Code

// Set CoPilot to warn when the current speed is greater than 5 MPH/KPH over the speed limit
GuidanceSettings.setThreshold(GuidanceSettings.SpeedThreshold.LEVEL_0);
// Set CoPilot to warn when the current speed is greater than 20 MPH/KPH over the speed limit
GuidanceSettings.setThreshold(GuidanceSettings.SpeedThreshold.LEVEL_3);

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs

GuidanceSettings.isSpeedAlertEnabled() GuidanceSettings.setSpeedAlert() GuidanceSettings.isSpeedAlertAudioEnabled() GuidanceSettings.setSpeedAlertAudio() GuidanceSettings.isSpeedLimitOnMap() GuidanceSettings.setSpeedLimitOnMap() GuidanceSettings.getSpeedLimitThreshold()


GuidanceSettings.isSafetyCameraAlertEnabled

Overview
Description Returns whether or not safety camera alerts are enabled.
Supported on Android Since Version 9.6.0.821
Platforms Supported Android, Linux
Type Method
Package com.alk.cpik.guidance

Syntax

boolean areSafetyCamerasEnabled()

Return Value

Boolean - True if enabled, false if disabled.

Sample Code

// Print whether or not safety camera alerts are enabled
boolean safetyCamAlertsEnabled = GuidanceSettings.isSafetyCameraAlertEnabled();
if (safetyCamAlertsEnabled)
  System.out.println("Safety camera alerts are enabled");
else
  System.out.println("Safety camera alerts are NOT enabled");

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs

  • GuidanceSettings.setSafetyCameraAlert()
  • GuidanceSettings.getSafetyCameraAlertRange()
  • GuidanceSettings.setSafetyCameraAlertRange()

GuidanceSettings.setSafetyCameraAlert

Overview
Description Enables or disables visual safety camera alerts.
Supported on Android Since Version 9.6.0.821
Type Method
Package com.alk.cpik.guidance

Syntax

void enableSafetyCameraAlerts(boolean)

Parameters

boolean cameraEnabled - True to enable, false to disable.

Sample Code

// Enable safety camera alerts
GuidanceSettings.setSafetyCameraAlert(true);
// Disable safety camera alerts
GuidanceSettings.setSafetyCameraAlert(false);

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs

GuidanceSettings.isSafetyCameraAlertEnabled() GuidanceSettings.getSafetyCameraAlertRange() GuidanceSettings.setSafetyCameraAlertRange()


GuidanceSettings.getSafetyCameraAlertRange

Overview
Description Returns how far in advance a driver will be warned about a safety camera.
Supported on Android Since Version 9.6.0.821
Type Method
Package com.alk.cpik.guidance

Syntax

SafetyCameraAlertRange getSafetyCameraLookaheadLevel()

Return Value

SafetyCameraAlertRange - An AlertRange object that represents how far in advance a driver should be warned about a safety camera.

Sample Code

// Display how far in advance warnings are shown for an approaching safety camera
GuidanceSettings.SafetyCameraAlertRange alertRange = GuidanceSettings.getSafetyCameraAlertRange();
switch (alertRange) {
  case SHORT:
    System.out.println("Safety camera warning display when the camera is within short range");
    break;
  case MEDIUM:
    System.out.println("Safety camera warning display when the camera is within medium range");
    break;
  case LONG:
    System.out.println("Safety camera warning display when the camera is within  long range");
    break;
  default:
    break;
}

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs

GuidanceSettings.isSafetyCameraAlertEnabled() GuidanceSettings.setSafetyCameraAlert() GuidanceSettings.setSafetyCameraAlertRange()


GuidanceSettings.setSafetyCameraAlertRange

Overview
Description Sets how far in advance a driver will be warned about a safety camera.
Supported on Android Since Version 9.6.0.821
Platforms Supported Android, Linux
Type Method
Package com.alk.cpik.guidance

Type

Method

Package

com.alk.cpik.guidance

Syntax

void setSafetyCameraLookaheadLevel(AlertRange)

Parameters

AlertRange – An enum that represents how far in advance a driver should be warned about a safety camera.

Return Value

void

Sample Code

// Set safety camera warnings to display when the camera is within short range
GuidanceSettings.setSafetyCameraAlertRange(GuidanceSettings.SafetyCameraAlertRange.SHORT);

// Set safety camera warnings to display when the camera is within medium range
GuidanceSettings.setSafetyCameraAlertRange(GuidanceSettings.SafetyCameraAlertRange.MEDIUM);

// Set safety camera warnings to display when the camera is within long range
GuidanceSettings.setSafetyCameraAlertRange(GuidanceSettings.SafetyCameraAlertRange.LONG);

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs

  • GuidanceSettings.isSafetyCameraAlertEnabled()
  • GuidanceSettings.setSafetyCameraAlert()
  • GuidanceSettings.getSafetyCameraAlertRange()

GuidanceSettings.setMapMode

Overview
Description Sets the current map scheme to the selected day-night background.
Supported on Android Since Version 9.6.0.821
Type Method
Package com.alk.cpik.guidance

Syntax

void setMapMode(MapMode)

Parameters

Mode - MapMode to be set.

Sample Code

// Set the map into day mode
GuidanceSettings.setMapMode(GuidanceSettings.MapMode.DAY);

// Set the map into night mode
GuidanceSettings.setMapMode(GuidanceSettings.MapMode.NIGHT);

// Set the map into automatic day/night mode, based on time
GuidanceSettings.setMapMode(GuidanceSettings.MapMode.AUTO);

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs Guidance.getMapMode


GuidanceSettings.getMapMode

Overview
Description Gets the current day-night mode of the map.
Supported on Android Since Version 9.6.0.821
Type Method
Package com.alk.cpik.guidance

Syntax

MapMode getMapMode()

Return Value

Returns the MapMode object being used with CoPilot.

Sample Code

// Get and print the current map display mode
GuidanceSettings.MapMode currMapMode = GuidanceSettings.getMapMode();
System.out.println("The current map display mode is: " + currMapMode.toString());

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs Guidance.serMapMode


GuidanceSettings.setDistanceToSayTurnNow

Overview
Description Sets the distance ahead of the turn at which CoPilot should tell the driver to turn. If CoPilot is set to use metric, the distance will be interpreted as meters. Otherwise, the distance is interpreted in yards.
Supported on Android Since Version 9.6.0.821
Type Method
Package com.alk.cpik.guidance

Syntax

void setDistanceToSayTurnNow(distanceForTurnNow)

Parameters

distanceForTurnNow - The distance where CoPilot should speak its "Turn Now" announcement in yards or meters.

Sample Code

// Set the "turn now" distance to 50 yards.
// Assumes CoPilot is set to use standard units of measure,
// Otherwise, (metric), this distance would be interpreted as meters.
int distanceForTurnNow = 50;
GuidanceSettings.setDistanceToSayTurnNow(distanceForTurnNow);

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs Guidance.getDistanceToSayTurnNow


GuidanceSettings.getDistanceToSayTurnNow

Overview
Description Gets the distance ahead of the turn at which CoPilot should tell the driver to turn.
Supported on Android Since Version 9.6.0.821
Type Method
Package com.alk.cpik.guidance

Syntax

Static int getDistanceToSayTurnNow

Return Value

Integer value indicating the current setting. If getUnitsOfMeasure() returns metric then the returned value will be in meters. Otherwise, the return value will be in yards.

Sample Code

// Get and print the distance before the turn at which CoPilot
// will instruct the driver to "turn now"
try {
  String distanceUnits;
  if (CopilotMgr.getUnitsOfMeasure() == UnitsOfMeasure.METRIC)
    distanceUnits = "meters";
  else if (CopilotMgr.getUnitsOfMeasure() == UnitsOfMeasure.IMPERIAL)
    distanceUnits = "yards";
  int turnNowDistance = GuidanceSettings.getDistanceToSayTurnNow();
  System.out.println("CoPilot will speak the turn now instruction " + String.valueOf(turnNowDistance) + " " + distanceUnits + " before an approaching turn");
} catch (CopilotException e) {
  e.printStackTrace();
}

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Related APIs Guidance.setDistanceToSayTurnNow


SpeedThreshold

Overview
Description An enum that corresponds to how much a speed limit has been exceeded. The units of this value are either km/h if CoPilot is set to metric, or mph if CoPilot is set to imperial.
Supported on Android Since Version 9.6.0.821
Type Enum
Package com.alk.cpik.guidance

Values

Value Description
LEVEL_0 Exceed the speed limit by 5 units
LEVEL_1 Exceed the speed limit by 10 units
LEVEL_2 Exceed the speed limit by 15 units
LEVEL_3 Exceed the speed limit by 20 units
LEVEL_4 Exceed the speed limit by 25 units
LEVEL_5 Exceed the speed limit by 30 units

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

SafetyCameraAlertRange

Overview
Description An enum of all available ranges at which a safety camera alert can be triggered.
Supported on Android Since Version 9.6.0.821
Type Enum
Package com.alk.cpik.guidance

Package

com.alk.cpik.guidance

Values

Value Description
SHORT This value sets the alert range to the shortest possible distance. This is currently set at 250 yards/meters.
MEDIUM This value sets the alert range to the middle distance available. This is currently set to 500 yards/meters.
LONG This value sets the alert range to the longest distance available. This is currently set to 1000 yards/meters.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

MapMode

Overview
Description An enum of all the different map background styles.
Supported on Android Since Version 9.6.0.821
Type Enum
Package com.alk.cpik.guidance

Values

Value Description
DAY Map has a lighter background
NIGHT Map has a dark background
AUTO Lets CoPilot decide whether the map background should be light or dark

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Coordinate

Overview
Description An instance of this class represents a latitude and longitude.
Supported on Android Since Version 9.6.0.821
Supported on iOS Since Version 10.9
Type Class
Package com.alk.cpik

Constructors

Method Name Description
Coordinate() Creates a new latitude/longitude pair at 0.0N, 0.0E. (0.0N, 0.0E) is typically used as an error value for GPS positions.
Coordinate(double dLat, double dLon) Creates a new latitude/longitude pair using the values provided.

Methods

Method Name Return Type Description
getLatitude() double Gets decimal representation of the stop's latitude.
getLongitude() double Gets decimal representation of the stop's longitude.
setLatitude(double latitude) void Sets latitude of a location.
setLongitude(double longitude) void Sets longitude of a location.

Sample Code

{
  double latitude = 40.3571;
  double longitude = -74.6702;
  Coordinate sampleCoord = new Coordinate(latitude, longitude);
}
Coordinate *coordinate = [[Coordinate alloc] initWithLatLon: 40.3571 withLon: -74.6702];

Example Output

Coordinates: 50.85N, 4.35E

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

PositionInfo

Overview
Description An object that contains information about the current position.
Supported on Android Since Version 9.6.0.821
Type Object
Package com.alk.cpik.guidance

Methods

Method Name Return Type Details
getPosition() Coordinate Gets position - absolute.
getSnappedPosition() Coordinate Gets position - snapped to the nearest road.
getSpeed() double Gets speed in either mph or km/h depending on CoPilot’s unit setting.
getHeading() double Gets heading in degrees.
getAltitude() double Gets altitude in feet.
getTimeStamp() Date Gets time in UTC.
getGpsFixQuality() GPSFixQuality Gets the quality of a GPS lock.
getNumSatellites() int Gets number of satellites contributing fix information to CoPilot’s best know position.
getNumTrackedSatellites() int Gets number of satellites being tracked.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GPSFixQuality

Overview
Description An enum whose values represent the possible quality of a GPS lock.
Supported on Android Since Version 9.6.0.821
Type Enum
Package com.alk.cpik.guidance

Values

Value Description
FIX_NONE No GPS Fix
FIX_2D A two-dimensional
AUTO Let CoPilot decide whether the map background should be light or dark.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

CPPositionInfo

Overview
Description Container object for information about the current position
Supported on iOS Since Version 10.9
Type Object
Package com.alk.cpik.guidance

Properties

Property Name Type
coordinate Coordinate
altitude Double
heading double
speed double
timestamp NSDate*
fixQuality CPGpsState
numSatellites short

CPGpsState

Overview
Description Enum whose values represent the possible quality of a GPS lock
Supported on iOS Since Version 10.9
Type Enum
Package com.alk.cpik.guidance

Values

Value Description
GpsFix_None No GPS Fix
GpsFix_2D A two-dimensional
GpsFix_3D Lets CoPilot identify if the day or night map style should be used

Road

Overview
Description An object that is created and populated by CoPilot on a getCurrentRoad call. The information in the road object only pertains to the portion of the road corresponding to the current GPS position.
Supported on Android Since Version 9.6.0.821
Supported on iOS Since Version 10.9
Type Object
Package com.alk.cpik.guidance

Methods

Method Name Return Type Description
getMinimumAddress() int Gets the lowest address number on this link.
getMaximumAddress() int Gets the highest address number on this link.
getRoadName() String Gets the name of the road that the link is a part of.
getRegion() String Gets the region that this road is located in.
getCountryInfo() Country Gets information about the country where the link is located.
getState() String Gets the name of the state where the link is located.
getSpeedLimit() int Gets the speed limit of this link.
getTruckSpeedLimit() Int Gets the truck speed limit. If there is no truck specific speed limit, it will be 0.
hasToll() boolean Returns whether or not a toll must be paid to access this link.
isUrban() boolean Returns whether or not this road is in an urban area. Urban roads are prone to congestion and should be avoided by through traffic.
getRouteNumbers() List<String> Gets the list of route numbers that are associated with this road.
getAllowedVehicles() List<AllowedVehicleType> Gets an array of specifying which vehicle types which are allowed to access this road.
getCity() String Gets the city that this road is located in.
getZip() String Gets the ZIP/postal code that this road is located in.
isInNationalNetwork() boolean Returns whether this road is part of the National Network is a government-designed system of highways.
isCommercialProhibited() boolean Returns whether this road is Commercial Prohibited, which designates a road that cannot be driven on by a truck under any circumstances
isTruckDesignated() boolean Returns whether this road is Truck Designated - a high-quality, rural highway, usually divided, that is not limited access but lacks congestion and has few stoplights.
isStateOversized() boolean Returns whether this road is State Oversized – state-designated oversized highways that are similar to highways in the National Network.
isPropaneRestricted() boolean Returns whether propane is restricted on this road.
isForbiddenToTrailers() boolean Returns whether or not trailers are forbidden on this road.
hasOversizedAccess boolean Returns true if the road has oversized access.
isOvertakingProhibited() boolean Returns whether or not overtaking (passing) is prohibited on this road.
isUnnamedRoad() boolean Returns whether or not the current road is unnamed.
getHazmatRestrictions() List<HazmatRestrictions> Denotes the hazmat restrictions of this road.
getDimensionRestrictions() RestrictedDimensions Outlines what are the truck restrictions on this road.
getRoadClass() RoadClass Return this road's class.
getRoadSubClass() RoadSubClass Return this road's subclass.

Example Output

Minimum address: 12; Maximum address: 206; Route numbers: [560, 49]; Road name: Church Lane; Region: Europe; Country: United Kingdom

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Road.RoadClass

Overview
Description An enum of all of the possible road classes.
Supported on Android Since Version 9.6.0.821
Supported on iOS Since Version Android, Linux
Type Enum
Package com.alk.cpik.guidance

Values

Value Description
NONE No road class data available for this particular link
COMMERCIAL_PROHIBITED Commercial vehicles are prohibited
TRUCK_DESIGNATED Designated for use by trucks
TRUCK_RESTRICTED Restricted for use by trucks
CLOSED Closed
INTERSTATE Highway
DIVIDED_HIGHWAY Divided Highway
PRIMARY Primary Road
FERRY Ferry route
SECONDARY Secondary road
RAMP Ramp, such as a highway exit
LOCAL Local road, such as residential roads.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

SafetyCamera

Overview
Description An object containing information about a specific safety camera.
Supported on Android Since Version 9.6.0.821
Supported on iOS Since Version 10.9
Type Object
Package com.alk.cpik.guidance

Methods

Method Name Return Type Description
isShowing() Boolean Returns whether or not the safety camera alert is showing on the navigation dialog.
distance() Double Returns the distance between the current position and the safety camera.
speedLimit() Int Returns the maximum speed that will not trigger the camera.
id() String Returns the unique string identifier for this specific instance of a safety camera.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Traffic

Overview
Description A class containing methods that can edit or retrieve traffic-related settings.
Supported on Android Since Version 9.6.0.821
Supported on iOS Since Version 9.6
Type Class
Package com.alk.cpik.guidance

Methods

Method Name Return Type Description
setTrafficMaxDistance(int) Void Sets the FlowRouteLookaheadMiles value as part of the FlowTraffic configuration.
setTrafficAlertEnabled(boolean) Void Sets whether traffic is enabled or disabled.
setTrafficRequestTimer(int) Void Sets RouteRerequestSecs as part of the FlowTraffic configuration.
setTrafficMinutesToAlert(int) Void Sets SignificantETTDeltaMins as part of the FlowTraffic configuration.
getTrafficMaxDistance() Int Returns the FlowTraffic configuration's FlowRouteLookaheadMiles.
getTrafficAlertEnabled() Boolean Returns whether FlowTraffic configuration is active.
getTrafficRequestTimer() Int Returns the FlowTraffic configuration's RouteRerequestSecs.
getTrafficMinutesToAlert() int Returns the FlowTraffic configuration's SignificantETTDeltaMins.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Country

Overview
Description An object that contains information about a country. This object provides the user with information detailing the country name in both local and set language, country code, drive side, currency, unit of measurement and also the language(s) spoken in that country.
Supported on Android Since Version 9.6.0.821
Supported on iOS Since Version 10.9
Type Object
Package com.alk.cpik.guidance

Methods

Method Name Return Type Description
getCountryName() String Returns the name of the country.
getCountryNameInCurrentLanguage() String Returns the name of the country in CoPilot's current language.
getCountryCode() String Returns the country code of the country.
getDriveSide() DriveSide Returns the side of the road on which the country drives.
getCurrency() String Returns the currency used in the country.
getUnitsOfMeasure() UnitsOfMeasure Returns the distance units used in the country.
getLanguages() ArrayList<String> Returns a list of the languages spoken in the country.
getSpeedInfo() String Returns the speed info used in the country.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

LaneAssistInfo

Overview
Description An object that contains a list of lanes associated with a lane assist event.
Supported on Android Since Version 9.6.0.821
Supported on iOS Since Version 10.9
Type Object
Package com.alk.cpik.guidance

Methods

Method Name Return Type Description
getLanes() List<Lane> Gets the current lanes. The first lane in the array is the left-most lane on the road.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Lane

Overview
Description Contains information about a lane, returned by getLaneAssist.
Supported on Android Since Version 9.6.0.821
Supported on iOS Since Version 10.9
Type Object
Package com.alk.cpik.guidance

Methods

Method Name Return Type Description
getTurnCode() TurnCode Returns the turning code. i.e. STRAIGHT, LEFT, RIGHT, SHARP_LEFT, SHARP_RIGHT, UTURN, WAYPOINT etc.
getLaneMarker() LaneMarker Returns the LaneMarker, DASHED and SOLID.
isValid() boolean Returns true if the lane is valid.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onShowLaneAssist
onHideLaneAssist

OverSpeedLimitWarning

Overview
Description An object that contains information related to the speed limit exceeded event.
Supported on Android Since Version 9.6.0.821
Supported on iOS Since Version 10.9
Type Object
Package com.alk.cpik.guidance

Methods

Method Name Return Type Description
getSpeedLimit() Int Returns the current speed limit of the road on which the user is traveling.
getCurrentSpeed() Int Returns the current speed the user is traveling.
getIsTruck() boolean Returns whether or not this is a truck speed limit. (This is applicable for Europe only.)

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

TruckWarning

Overview
Description An object that contains information associated with truck warnings, such as turn restrictions, sharp curves and notifications of fuel stops ahead.
Supported on Android Since Version 9.6.0.821
Supported on iOS Since Version 10.9
Type Object
Package com.alk.cpik.guidance

Methods

Method Name Return Type Description
getWarningType() TruckWarningType Returns truck warning type of this event.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

TruckWarningType

Overview
Description An enum whose values represent various types of truck warnings. These warnings are available in Europe only.
Supported on Android Since Version 9.6.0.821
Type Enum
Package com.alk.cpik.guidance

Values

Value Description
NO_UTURN A no U-turn restriction on the road.
NO_LEFT A no left turn restriction on the road.
NO_RIGHT A no right turn restriction on the road.
PROTECTED_OVERTAKING_EXTRA_LANE Overtaking extra lane is protected.
PROTECTED_OVERTAKING_EXTRA_LANE_RIGHTSIDE Overtaking extra lane on the right side is protected.
PROTECTED_OVERTAKING_EXTRA_LANE_LEFTSIDE Overtaking extra lane on the left side is protected.
ROAD_NARROWS This road narrows ahead.
SHARP_CURVE_RIGHT There is a sharp right turn.
SHARP_CURVE_LEFT There is a sharp left turn.
STEEP_HILL_UPWARDS There is a steep hill upward direction.
STEEP_HILL_DOWNWARDS There is a steep hill downward direction.
LATERAL_WIND There is a risk of high winds blowing lateral.
RISK_OF_GROUNDING There is a risk of grounding ahead.
TREE_OVERHANG There are overhanging trees ahead.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

TurnInstruction

Overview
Description An object that contains information related to turn-by-turn guidance instructions.
Supported on Android Since Version 9.6.0.821
Supported on iOS Since Version 10.9
Type Object
Package com.alk.cpik.guidance

Methods

Method Name Return Type Description
getGuidanceInstruction() String Retrieves the next guidance instruction.
getExitNumber() String Retrieves the exit number.
getExitRoadName() String Retrieves the name of the road on which the driver will exit.
getStreetNameForNextTurn() String Retrieves the name of the street that the driver should turn onto next.
getDistanceToNextTurn() String Retrieves the distance until the approaching turn.
getDistanceToTurnAfterNext() String Retrieves the distance until the next (not the approaching) turn. If the driver is supposed to turn onto Street A and then Street B, this will return the distance until Street B.
getTurnIconForNextTurn() TurnArrowImage Retrieves the turn icon ID for the upcoming turn.
getTurnIconForTurnAfterNext() TurnArrowImage Retrieves the turn icon ID for the turn after the approaching turn. If the driver is supposed to turn onto Street A and then Street B, this will return the icon ID for the turn onto Street B.
isUnnamedRoad() Boolean Returns whether or not the the street to be turned onto is unnamed.
isRoundAbout() Boolean Designates whether or not the upcoming turn occurs on a round about.
getRoundAboutExitNumber() Int Retrieves which exit number on the roundabout a turn is to be made. If the turn is not on a roundabout, this value will be zero.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

ItineraryInfo

Overview
Description An object that contains data related to a trip’s itinerary. This information, provided by CoPilot, includes turn instructions, turn images and distances.
Supported on Android Since Version 9.6.0.1848
Supported on iOS Since Version 10.9
Type Object
Package com.alk.cpik.guidance

Methods

Method Name Return Type Description
getInstruction() String Gets turns instructions.
getDistanceOnSegment() String Gets distance on the current trip segment.
getTurnIconForNextTurn() TurnArrowImage An enum of turn arrow images.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getCurrentPosition

Overview
Description Provides information relating to CoPilot’s current or last known location. This will include coordinates as well as other location information detailing the quality of the GPS fix and the number of satellites contributing to the current GPS fix.

Note: The last known position will be returned when the current location cannot be determined. This could potentially be from a previous run of the application, depending when this API is used. An object that contains data related to a trip’s itinerary. This information, provided by CoPilot, includes turn instructions, turn images and distances.

Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

PositionInfo getCurrentLocation()
+(CPPositionInfo*)

Return Value

A PositionInfo object populated with data pertaining to CoPilot's current or last known position.

Sample Code

// Get and print details about CoPilot's current position
try {
  PositionInfo currentPosition = GuidanceMgr.getCurrentPosition();
  System.out.println("Current location: " + currentPosition.getPosition().toString());
  System.out.println("Heading: " + currentPosition.getHeading());
  System.out.println("Speed: " + currentPosition.getSpeed());
  System.out.println("SnappedPosition: " +  currentPosition.getSnappedPosition().toString());
  System.out.println("Timestamp: " +  currentPosition.getTimestamp().toString());
} catch (CopilotException e) {
  e.printStackTrace();
}
CPPositionInfo *position = [GuidanceMgr getCurrentPosition];

NSLog([@"Position"]);
NSLog([NSString stringWithFormat:@"Latitude: %f",
position.coordinate.latitude]);
NSLog([NSString stringWithFormat:@"Longitude: %f",
position.coordinate.longitude]);
NSLog([NSString stringWithFormat:@"Altitude: %f", position.altitude]);
NSLog([NSString stringWithFormat:@"Heading: %f", position.heading]);
NSLog([NSString stringWithFormat:@"Speed: %f", position.speed]);

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getLaneAssist

Overview
Description Returns a LaneAssistInfo object representing the current lane assist information.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

LaneAssistInfo getLaneAssist() throws CopilotException
+(LaneAssistInfo*) getLaneAssist

Return Value

A LaneAssistInfo object with the current lane assist information.

Sample Code

// Get and print lane assist information
try {
  LaneAssistInfo currLaneAssist = GuidanceMgr.getLaneAssist();
  System.out.println("Current lane assist lane " +  currLaneAssist.getLanes());
  System.out.println("Current lane assist info " +  currLaneAssist.toString());
} catch (CopilotException e) {
  e.printStackTrace();
}
LaneAssistInfo *info = [GuidanceMgr getLaneAssist];
for(Lane *lane in info.lanes)
{
 NSLog(@"Lane");
 NSLog([NSString stringWithFormat:@"Turn Code: %d", lane.turnCode]);
 NSLog([NSString stringWithFormat:@"Lane Marker: %d", lane.laneMarker]);
 NSLog([NSString stringWithFormat:@"Valid: %@", (lane.valid == true) ? @"Yes" : @"No"]);
}

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getTurnInstruction

Overview
Description Gets information about the upcoming turn instruction.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

TurnInstruction getTurnInstruction() throws CopilotException
+(TurnInstruction*) getTurnInstruction

Return Value

A TurnInstruction object that contains the information about the upcoming turn.

Sample Code

// Get and print turn instruction information
try {
  TurnInstruction currentTurnInstruction = GuidanceMgr.getTurnInstruction();
  System.out.println("DistanceToNextTurn : " + currentTurnInstruction.getDistanceToNextTurn());
  System.out.println("ExitRoadName : " + currentTurnInstruction.getExitRoadName());
  System.out.println("GuidanceInstruction : " + currentTurnInstruction.getGuidanceInstruction());
  System.out.println("DistanceToTurnAfterNext : " + currentTurnInstruction.getDistanceToTurnAfterNext());
  System.out.println("StreetNameForNextTurn : " + currentTurnInstruction.getStreetNameForNextTurn());
  //for all values
  System.out.println("turn instruction information : " + currentTurnInstruction.toString());
} catch (CopilotException e) {
  e.printStackTrace();
}
TurnInstruction *instruction= [GuidanceMgr getTurnInstruction];
NSLog(@"Distance to Turn After Next: %@", instruction.distanceToTurnAfterNext);
NSLog(@"Exit Road Name: %@", instruction.exitRoadName);
NSLog(@"Icon for Turn After Next: %d", instruction.iconForTurnAfterNext);
NSLog(@"Unnamed Road: %@", (instruction.unnamedRoad == true) ? @"Yes" : @"No");
NSLog(@"Roundabout: %@", (instruction.roundAbout == true) ? @"Yes" : @"No");
NSLog(@"Roundabout Exit Number: %d", instruction.roundAboutExitNumber);

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getDistanceToDestination

Overview
Description Provides the distance from the current location to the destination that has been entered into CoPilot. This will be returned in miles or kilometers depending on the settings. If CoPilot has not been started, an error will be returned.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

double getDistanceToDestination() throws CopilotException
+(double) getDistanceToDestination

Return Value

The distance remaining to the destination. This distance will be in miles if CoPilot is set to use imperial measurements or meters if CoPilot is set to use metric measurements.

Sample Code

// Get and print the distance to the destination
try {
  double distanceToDest = GuidanceMgr.getDistanceToDestination();
  String distanceUnits = "";
  if (CopilotMgr.getUnitsOfMeasure() == UnitsOfMeasure.METRIC)
    distanceUnits = "meters";
  else if (CopilotMgr.getUnitsOfMeasure() == UnitsOfMeasure.IMPERIAL)
    distanceUnits = "miles";
    System.out.println("Currently " + String.valueOf(distanceToDest) + " " + distanceUnits + " away from the destination");
} catch (CopilotException e) {
  e.printStackTrace();
}
NSLog([NSString stringWithFormat:@"Distance to Destination: %f",[GuidanceMgr getDistanceToDestination]]);

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getCurrentRoad

Overview
Description Gets information about the current road.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

Road getCurrentRoad()
+(Road*) getCurrentRoad

Return Value

A Road object containing information about the current road.

Sample Code

// Get and print the current road
Road currentRoad = GuidanceMgr.getCurrentRoad();
System.out.println("Current road name: " + currentRoad.getRoadName());
System.out.println("Current road city: " + currentRoad.getCity());
System.out.println("Current road state: " + currentRoad.getState());
System.out.println("Current road zip: " + currentRoad.getZip());
System.out.println("Current road HazmatRestrictions: " + currentRoad.getHazmatRestrictions());
System.out.println("Current road RoadClass: " + currentRoad.getRoadClass());
System.out.println("Current road SpeedLimit: " + currentRoad.getSpeedLimit());

//for all values
System.out.println("Current road info: " + currentRoad.toString());
Road *road = [GuidanceMgr getCurrentRoad];
NSLog(@"Minimum Address : %d", road.minimumAddress);
NSLog(@"Maximum Address : %d", road.maximumAddress);
NSLog(@"Truck Speed Limit: %d", road.truckSpeedLimit);
NSLog(@"Is Urban: %@", (road.isUrban == true) ? @"Yes" : @"No");
NSLog(@"Has Toll: %@", (road.hasToll == true) ? @"Yes" : @"No");

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getRouteCoordinates

Overview
Description Gets a list of coordinates that describe the current guidance route.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

Java ArrayList getRouteCoordinates(boolean bFromCurrentPosition, double dLookAhead, double dGranularity) throws CopilotException
+(NSArray*) getRouteCoordinates:(bool) (double) (double)

Parameters

Boolean bFromCurrentPosition - True if requesting only the points starting from the current position on the route. False if requesting the entire route.

Double dLookAhead – The distance in miles to look ahead on the route.

Double dGranularity – A value between 0.0 and 1.0 that will indicate how coarse the returned list of Coordinates will be. A value of 1.0 will return the finest possible route.

Return Value

An ArrayList object that contains the list of Coordinate objects that represents the route.

Sample Code

// Get and print the coordinates along the current route
// From the current position
// For a distance of 2.5 miles ahead
// With the medium granularity
boolean fromCurrentPosition = true;
double lookAheadMiles = 2.5;
double granularity = 0.50;
try {
  List<Coordinate> coordsAheadOnRoute = GuidanceMgr.getRouteCoordinates(fromCurrentPosition, lookAheadMiles, granularity);
  System.out.println("Coordinates ahead on route: " + coordsAheadOnRoute.toString());
} catch (CopilotException e) {
  e.printStackTrace();
}
NSArray* coords =
[GuidanceMgr getRouteCoordinates:true withLookAhead:5withGranularity:0.0];
for(Coordinate * coord in coords)
{
 NSLog(@"Coordinate");
 NSLog([NSString stringWithFormat:@"Latitude: %f", coord.latitude]);
 NSLog([NSString stringWithFormat:@"Latitude: %f",coord.latitude]);
}

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getRouteTmcCodes

Overview
Description Gets a list of TMC location codes that describe the current guidance route.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

ArrayList getRouteTmcCodes() throws CopilotException

Return Value

An ArrayList object that contains the list of TMC location codes describing the current route.

Sample Code

// Get and print the list of TMC codes for the roads taken by the current route
try {
  ArrayList<String> routeTMCCodes = GuidanceMgr.getRouteTmcCodes();
  for (String str : routeTMCCodes)
  System.out.println("Current route TMC codes: " + str);
} catch (CopilotException e) {
  e.printStackTrace();
}
NSArray* tmcCodes = [GuidanceMgr getRouteTmcCodes];
for(NSString * string in tmcCodes)
{
 NSLog(@"TmcCode");
 NSLog(string);
}

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getRouteTmcCodes (No duplicates)

Overview
Description Gets a list of TMC location codes that describe the current guidance route, with the ability to remove duplicates from the list.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version Android, Linux
Type Method
Package com.alk.cpik.guidance

Syntax

ArrayList getRouteTmcCodes(boolean removeDuplicates) throws CopilotException

Parameters

bRemoveDuplicates – True if the duplicates should be removed from the returned list.

Return Value

An ArrayList object that contains the list of TMC location codes describing the current route.

Sample Code

// // Get and print the list of TMC codes for the roads taken by the current route and remove duplicates
try {
  boolean removeDuplicates = true;
  ArrayList<String> routeTMCCodes =
  GuidanceMgr.getRouteTmcCodes(removeDuplicates);
  for (String str : routeTMCCodes)
    System.out.println("Current route TMC codes without duplicates: " + str);
} catch (CopilotException e) {
  e.printStackTrace();
}
NSArray* tmcCodes = [GuidanceMgr getRouteTmcCodes:false];
for(NSString * string in tmcCodes)
{
 NSLog(@"TmcCode");
 NSLog(string);
}

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getCurrentSafetyCamera

Overview
Description Gets the current Safety Camera info, if it exists.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

SafetyCamera getCurrentSafetyCamera() throws CopilotException
+(SafetyCamera*) getCurrentSafetyCamera

Return Value

A SafetyCamera object that contains information about the safety camera that is currently displayed on the CoPilot guidance map.

Sample Code

// Get and print information about the safety camera alert currently being shown
try {
  SafetyCamera currentSafetyCam = GuidanceMgr.getCurrentSafetyCamera();
  System.out.println("Current safety camera speedLimit : " + currentSafetyCam.speedLimit());
  System.out.println("Current safety camera id : " + currentSafetyCam.id());
  System.out.println("Current safety camera isShowing: " + (currentSafetyCam.isShowing() ? "True" : "false"));
  // for all values
  System.out.println("Current safety camera: " + currentSafetyCam.toString());
} catch (CopilotException e) {
  e.printStackTrace();
}
SafetyCamera *camera = [GuidanceMgr getCurrentSafetyCamera];
NSLog(@"Safety Camera"];
NSLog(NSString stringWithFormat:@"Showing: %@", (camera.showing = true) ?@"Yes" : @"No"]);
NSLog([NSString stringWithFormat:@"Distance: %f", camera.distance]);
NSLog([NSString stringWithFormat:@"Speed Limit: %d", camera.speedLimit]);
NSLog([NSString stringWithFormat:@"Description: %@", camera.description]);

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getETA

Overview
Description Provides details of the current estimated time of arrival (ETA) for the first destination of the trip that CoPilot is navigating. If CoPilot has not yet started or does not have a destination entered, an exception will be thrown.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version Android, Linux
Type Method
Package com.alk.cpik.guidance

Syntax

Date getETA()
+(NSDate*) getETA

Return Value

A Date object indicating the estimated time of arrival.

Sample Code

// Get and print the ETA at the destination
try {
  Date eta = GuidanceMgr.getETA();
  System.out.println("Current ETA: " + eta.toString());
} catch (CopilotException e) {
  e.printStackTrace();
}
NSDate *date = [GuidanceMgr getETA];
NSLog(@"ETA");
NSLog([NSDateFormatter localizedStringFromDate:date dateStyle:NSDateFormatterShortStyle timeStyle:NSDateIntervalFormatterFullStyle]);

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getItineraryInfoList

Overview
Description Returns the full itinerary currently stored within CoPilot. Itinerary information will be passed back via onItineraryUpdate. A subsequent onItineraryUpdate will be returned after any of the following events:

- Route calculation finish

- Route is finished

- Refresh of the route calculation dialog

- Current segment (link) is changed

- Any Detour

- Penalty added to link/segment (traffic received)

- Penalty removed from link/segment (traffic is cleared)

- Update itinerary report in case language or distance unit changed

- Trip is changed

Supported on Android Since Version 9.6.0.1848
Supported on iOS Since Version 10.9
Type Class
Package com.alk.cpik.guidance

Methods

ItineraryEntryList getItineraryInfoList()
+(NSArray*) getItineraryInfoList

Return Value

A list representing each ItineraryInfo object.

Sample Code

// Get the entire itinerary
try {
  List<ItineraryInfo> itineraryList = GuidanceMgr.getItineraryInfoList();
  for (ItineraryInfo itinerary : itineraryList) {
    System.out.println("itinerary Instruction : " + itinerary.getInstruction());
    System.out.println("itinerary DistanceOnSegment : " + itinerary.getDistanceOnSegment());
    System.out.println("itinerary TurnIconForNextTurn : " + itinerary.getTurnIconForNextTurn());
    // for all values
    System.out.println("itinerary Instruction : " + itinerary.toString());
  }
} catch (CopilotException e) {
  e.printStackTrace();
}

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getGPSDevice

Overview
Description Gets the CoPilot GPS Device used to manually push GPS Coordinates or NMEA sentences.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

GPSDevice getGPSDevice()
+(GPSDevice*) getGPSDevice

Return Value

Singleton instance of the CoPilot GPS Device.

Sample Code

// Get the instance of the GPS device
GPSDevice device = GuidanceMgr.getGPSDevice();
if (device != null)
System.out.println("GPSDevice is available");
else
System.out.println("GPSDevice is not available");
GPSDevice *device = [GuidanceMgr getGPSDevice];

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.setChevronDisplaySetting

Overview
Description Sets the type of information that will be displayed under the chevron in CoPilot. The chevron is the arrow or dot displayed on the map to indicate the current position.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version Android, Linux
Type Method
Package com.alk.cpik.guidance

Syntax

Static void setChevronDisplaySetting
+(void)setChevronDisplaySettings

Parameters

chevronDisplayType – Sets the ChevronDisplayType enum value.

Sample Code

// Set the chevron to display nothing
GuidanceMgr.setChevronDisplaySetting(ChevronDisplayType.NONE);
// Set the chevron to display the current road name
GuidanceMgr.setChevronDisplaySetting(ChevronDisplayType.CURRENT_ROAD);
// Set the chevron to display the current Lat/Lon
GuidanceMgr.setChevronDisplaySetting(ChevronDisplayType.LAT_LON);
[GuidanceMgr setChevronDisplaySetting:CHEVRON_NONE];

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getChevronDisplaySetting

Overview
Description Gets the type of information that will be displayed under the chevron in CoPilot. The chevron is the arrow or dot displayed on the map to indicate the current position.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version Android, Linux
Type Method
Package com.alk.cpik.guidance

Syntax

ChevronDisplayType getChevronDisplaySetting

Return Value

ChevronDisplayType enum value

Sample Code

// Get and print the current chevron display setting
ChevronDisplayType currentChevronDisplay = GuidanceMgr.getChevronDisplaySetting();
System.out.println("Current chevron display setting: " + currentChevronDisplay.toString());

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.enableEarlyTurnWarning

Overview
Description Enables the early turn warning that occurs at 2 miles or 2 kilometers before the turn.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

void enableEarlyTurnWarning(boolean enable)
+(void) enableEarlyTurnWarning:(bool)enable

Sample Code

// Enable early turn warning
GuidanceMgr.enableEarlyTurnWarning(true);
[GuidanceMgr enableEarlyTurnWarning:true];

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.isEarlyTurnWarningEnabled

Overview
Description Checks whether or not the early turn warning, which occurs at 2 miles or 2 kilometers before the turn, is enabled.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

boolean isEarlyTurnWarningEnabled
+(bool) isEarlyTurnWarningEnabled

Return Value

Boolean - True if the early turn warning is enabled. False otherwise.

Sample Code

// Print whether or not early turn warning is enabled
boolean earlyTurnWarningEnabled = GuidanceMgr.isEarlyTurnWarningEnabled();
if (earlyTurnWarningEnabled)
  System.out.println("Early turn warning is enabled");
else
  System.out.println("Early turn warning is NOT enabled");
if ([GuidanceMgr isEarlyTurnWarningEnabled]])
 NSLog(@"Early Turn Warning On!");
else
 NSLog(@"Early Turn Warning Off!");

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.enableNearTurnWarning

Overview
Description Enables the near turn warning that occurs at .5 kilometers or .5 miles before the turn.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

void enableNearTurnWarning(boolean enable)
+(void)enableNearTurnWarning:(bool) enable

Sample Code

// Enable near turn warning
GuidanceMgr.enableNearTurnWarning(true);
// Disable near turn warning
GuidanceMgr.enableNearTurnWarning(false);
[GuidanceMgr enableNearTurnWarning:true];

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.isNearTurnWarningEnabled

Overview
Description Checks whether or not the near turn warning, which occurs at .5 kilometers or .5 miles before the turn, is enabled.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

boolean isNearTurnWarningEnabled
+(bool) isNearTurnWarningEnabled

Return Value

Boolean – True if the near turn warning is enabled. False otherwise.

Sample Code

// Print whether or not near turn warning is enabled
boolean nearTurnWarningEnabled = GuidanceMgr.isNearTurnWarningEnabled();
if (nearTurnWarningEnabled)
  System.out.println("Near turn warning is enabled");
else
  System.out.println("Near turn warning is NOT enabled");
if ([GuidanceMgr isNearTurnWarningEnabled]])
 NSLog(@"Near Turn Warning On!");
else
 NSLog(@"Near Turn Warning Off!");

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.enableFarTurnWarning

Overview
Description Enables the far turn warning that occurs at 1 kilometer or 1 mile before the turn.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version Android, Linux
Type Method
Package com.alk.cpik.guidance

Syntax

void enableFarTurnWarning(boolean enable)
+(void)enableFarTurnWarning:(bool) enable

Sample Code

// Enable near turn warning
GuidanceMgr.enableFarTurnWarning(true);
// Disable near turn warning
GuidanceMgr.enableFarTurnWarning(false);
[GuidanceMgr enableFarTurnWarning:true];

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.isFarTurnWarningEnabled

Overview
Description Checks whether or not the far turn warning, which occurs at 1 kilometer or 1 mile before the turn, is enabled.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version Android, Linux
Type Method
Package com.alk.cpik.guidance

Syntax

boolean isFarTurnWarningEnabled
+(bool) isFarTurnWarningEnabled

Return Value

Boolean true if the near turn warning is enabled. False otherwise.

Sample Code

// Print whether or not near turn warning is enabled
boolean farTurnWarningEnabled = GuidanceMgr.isFarTurnWarningEnabled();
if (farTurnWarningEnabled)
  System.out.println("Near turn warning is enabled");
else
  System.out.println("Near turn warning is NOT enabled");
if ([GuidanceMgr isFarTurnWarningEnabled]])
 NSLog(@"Far Turn Warning On!");
else
 NSLog(@"Far Turn Warning Off!");

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.enableTurnRestrictions

Overview
Description Enables or disables turn restrictions - signs in the map view to show the driver where any restricted turns (e.g. no left or no right turn) are along the route.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

void enabledTurnRestrictions
+(void) enableTurnRestrictions

Parameters

Boolean true to enable turn restrictions. False to disable turn restrictions.

Sample Code

// Enable turn restrictions
GuidanceMgr.enableTurnRestrictions(true);
// Disable turn restrictions
GuidanceMgr.enableTurnRestrictions(false);
[GuidanceMgr enableTurnRestrictions:true];

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.isTurnRestrictionEnabled

Overview
Description Checks to see whether turn restrictions are enabled or disabled. Turn restrictions are signs in the map view to show the driver where any restricted turns (e.g. no left or no right turn) are along the route.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

boolean isTurnRestrictionEnabled
+(bool) isTurnRestrictionEnabled

Return Value

Boolean - True if the feature is enabled. False otherwise.

Sample Code

// Print whether or not turn restrictions are enabled
boolean turnRestrictionsEnabled = GuidanceMgr.isTurnRestrictionEnabled();
if (turnRestrictionsEnabled)
  System.out.println("Turn restrictions are enabled");
else
  System.out.println("Turn restrictions are NOT enabled");
if ([GuidanceMgr isTurnRestrictionEnabled]])
 NSLog(@"Turn Restriction On!");
else
 NSLog(@"Turn Restriction Off!");

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.enableClearTurnView

Overview
Description Enables or disables the ClearTurn feature, which displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

void enableClearTurnView
+(void) enableClearTurnView

Parameters

Enable - Boolean true to enable ClearTurn. False to disable ClearTurn.

Sample Code

// Enable clear turn view
GuidanceMgr.enableClearTurnView(true);
// Disable clear turn view
GuidanceMgr.enableClearTurnView(false);
[GuidanceMgr enableClearTurnView:true];

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.isClearTurnViewEnabled

Overview
Description Checks to see whether ClearTurn is enabled or disabled. ClearTurn displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version Android, Linux
Type Method
Package com.alk.cpik.guidance

Syntax

boolean isClearTurnViewEnabled
+(bool) isClearTurnViewEnabled

Return Value

Boolean - True if the feature is enabled. False otherwise.

Sample Code

// Print whether or not clear turn view is enabled
boolean clearTurnViewEnabled = GuidanceMgr.isClearTurnViewEnabled();
if (clearTurnViewEnabled)
  System.out.println("Clear turn view is enabled");
else
  System.out.println("Clear turn view is NOT enabled");
if ([GuidanceMgr isClearTurnViewEnabled]])
 NSLog(@"Clear Turn On!");
else
 NSLog(@"Clear Turn Off!");

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.enableClearTurnViewOnlyForHighways

Overview
Description Enables or disables the ClearTurn feature only for highways. ClearTurn displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

void enableClearTurnViewOnlyForHighways(boolean enable)
+(void) enableClearTurnViewOnlyForHighways:(bool) enable

Parameters

Boolean - True to enable ClearTurn. False to disable ClearTurn.

Return Value

// Enable clear turn view
GuidanceMgr.enableClearTurnViewOnlyForHighways (true);
// Disable clear turn view
GuidanceMgr.enableClearTurnViewOnlyForHighways (false);
[GuidanceMgr enableClearTurnViewOnlyForHighways:true];

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.isClearTurnViewEnabledOnlyForHighways

Overview
Description Checks whether or not ClearTurn is set to show only for highways. ClearTurn displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version Android, Linux
Type Method
Package com.alk.cpik.guidance

Syntax

boolean isClearTurnViewEnabledOnlyForHighways
+(bool) isClearTurnViewEnabledOnlyForHighways

Return Value

Boolean - True if the feature is enabled. False otherwise.

Sample Code

// Print whether or not clear turn view is enabled only for highways
boolean clearTurnViewEnabledHwy = GuidanceMgr.isClearTurnViewEnabledOnlyForHighways();
if (clearTurnViewEnabledHwy)
  System.out.println("Clear turn view is enabled only for highways");
else
  System.out.println("Clear turn view is NOT enabled only for highways");
if ([GuidanceMgr isClearTurnViewEnabledOnlyForHighways]])
 NSLog(@"Clear Turn Highways On!");
else
 NSLog(@"Clear Turn Highways Off!");

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.setClearTurnInstructionDrawDistance

Overview
Description Sets the distance from the turn at which ClearTurn views will draw. ClearTurn displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version Android, Linux
Type Method
Package com.alk.cpik.guidance

Syntax

void setClearTurnInstructionDrawDistance(int)
+(void) setClearTurnInstructionDrawDistance:(int)

Parameters

Integer distance measure in 1/10 of a mile or 1/10 of a kilometer.

Sample Code

// Set clear turn instruction draw distance to 1.3 miles
// This assumes CoPilot's units are set to imperial
int iDistance =13;
GuidanceMgr.setClearTurnInstructionDrawDistance(13);
[GuidanceMgr setClearTurnInstructionDrawDistance:13];

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getClearTurnInstructionDrawDistance

Overview
Description Retrieves the distance at which ClearTurn view will draw. ClearTurn displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits.
Supported on Android Since Version 9.6.0.868
Supported on Android Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

int getClearTurnInstructionDrawDistance
+(int) getClearTurnInstructionDrawDistance

Return Value

Integer distance at which Clear Turn will draw in 1/10 of a mile or 1/10 of a kilometer, depending on CoPilot’s unit setting.

Sample Code

// Print the clear turn instruction draw distance
int drawDistance = GuidanceMgr.getClearTurnInstructionDrawDistance();
System.out.println("Draw distance: " + String.valueOf(drawDistance));
int drawDistance = [GuidanceMgr getClearTurnInstructionDrawDistance];

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.setClearTurnInstructionHideDistance

Overview
Description Sets the distance from the turn at which ClearTurn views will hide. ClearTurn displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

void setClearTurnInstructionHideDistance(int)
+(void) setClearTurnInstructionHideDistance:(int)

Parameters

Integer distance at which ClearTurn views will hide in 1/10 of a mile or 1/10 a kilometer.

Sample Code

// Set clear turn instruction draw distance to 1.3 miles
// This assumes CoPilot's units are set to imperial
int iDistance = 13;
GuidanceMgr.setClearTurnInstructionHideDistance(13);
[GuidanceMgr setClearTurnInstructionHideDistance:13];

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.getClearTurnInstructionHideDistance

Overview
Description Retrieves the distance at which the ClearTurn view will be hidden. ClearTurn displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

int getClearTurnInstructionHideDistance
+(int) getClearTurnInstructionHideDistance

Return Value

Integer distance at which the ClearTurn view will be hidden in 1/10 of a mile or 1/10 of a kilometer.

Sample Code

// Print the clear turn instruction hide distance
int hideDistance = GuidanceMgr.getClearTurnInstructionHideDistance();
System.out.println("Hide distance: " + String.valueOf(hideDistance));
int hideDistance = [GuidanceMgr getClearTurnInstructionHideDistance];

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.showTurnAfterNext

Overview
Description Enables or disables the display of the turn after the approaching turn.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

void showTurnAfterNext(Boolean)
+(void) showTurnAfterNext:(bool)

Parameters

Boolean - True to enable the feature. False to disable.

Sample Code

// Enable displaying the turn after next
GuidanceMgr.showTurnAfterNext(true);

// Disable displaying the turn after next
GuidanceMgr.showTurnAfterNext(false);
[GuidanceMgr showTurnAfterNext:true];

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.isTurnAfterNextEnabled

Overview
Description Checks whether or not the turn after the approaching turn will display.
Supported on Android Since Version 9.6.0.868
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

boolean isTurnAfterNextEnabled
+(bool) isTurnAfterNextEnabled

Return Value

Boolean - True if the feature is enabled. False otherwise.

Sample Code

// Print whether or not the turn after next will display
boolean turnAfterNextDisplay = GuidanceMgr.isTurnAfterNextEnabled();
if (turnAfterNextDisplay)
  System.out.println("Turn after next will display");
else
  System.out.println("Turn after next will NOT display");
if ([GuidanceMgr isTurnAfterNextEnabled]])
 NSLog(@"Turn After Next On!");
else
 NSLog(@"Turn After Next Off!");

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

GuidanceMgr.suspendNavigation

Overview
Description Suspends navigation. When this API is called, the position on the map will not update and guidance will stop until re-enabled. This is meant to reduce CPU usage at times when navigation is not necessary. GuidanceMgr.getCurrentRoad() will continue to work as expected.

This API differs from CopilotMgr.enableGPS() / CopilotMgr.disableGPS()(Android only) in that the GPS device itself will remain open and the current position will be updated for the GuidanceMgr.getCurrentRoad() API.

Supported on Android Since Version 9.6.0.1453
Supported on iOS Since Version 10.9
Type Method
Package com.alk.cpik.guidance

Syntax

void suspendNavigation(Boolean)
+(void) suspendNavigation:(bool)

Parameters

bSuspend - true to suspend navigation, or false to re-enable navigation.

Sample Code

// Suspend navigation
GuidanceMgr.suspendNavigation(true);
// Re-enable later
GuidanceMgr.suspendNavigation(false);

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

ChevronDisplayType

Overview
Description An enum of the information displayed beneath the chevron in CoPilot during guidance. The chevron is the arrow or dot displayed on the map to indicate the current position.
Supported on Android Since Version 9.6.0.821
Type Enum
Package com.alk.cpik.guidance

Values

Value Description
NONE Nothing is Displayed.
CURRENT_ROAD Display the current road.
DESTINATION Display the destination.
NEAREST_TOWN Display the nearest town.
Heading Display the current heading.
LAT_LON Display the current latitude/longitude position.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

DriveSide

Overview
Description An enum of the side of the road on which a country drives.
Supported on Android Since Version 9.6.0.821
Type Enum
Package com.alk.cpik.trip

Values

Value Description
DRIVE_SIDE_UNAVAILABLE Drive side information for the country is unavailable.
DRIVE_SIDE_LEFT A country in which they drive on the left side of the road.
DRIVE_SIDE_RIGHT A country in which they drive on the right side of the road.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

UnitsOfMeasure

Overview
Description An enum that provides details on units of measurement.
Supported on Android Since Version 9.6.0.821
Type Enum
Package com.alk.cpik.trip

Values

Value Description
UNAVAILABLE Units of measure are unavailable
METRIC Metric units of measure
IMPERIAL Imperial units of measure

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

CPUnitsOfMeasure

Overview
Description An enum that provides details on units of measurement.
Supported on iOS Since Version 10.9
Type Enum
Package com.alk.cpik.trip

Values

Value Description
CP_UNAVAILABLE Units of measure are unavailable
CP_METRIC Metric units of measure
CP_IMPERIAL Imperial units of measure

SpeedLimitWarningThreshold

Overview
Description An enum of the speed by which the driver must exceed the speed limit to receive a warning.
Supported on Android Since Version 9.6.0.821
Type Enum
Package com.alk.cpik.trip

Values

Value Description
LEVEL_0 Exceeding the speed limit by 5 mph/kph
LEVEL_1 Exceeding the speed limit by 10 mph/kph
LEVEL_2 Exceeding the speed limit by 15 mph/kph
LEVEL_3 Exceeding the speed limit by 20 mph/kph
LEVEL_4 Exceeding the speed limit by 25 mph/kph
LEVEL_5 Exceeding the speed limit by 30 mph/kph

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

AlertRange

Overview
Description An enum of the proximity to a safety camera at which the driver will be alerted.
Supported on Android Since Version 9.6.0.821
Type Enum
Package com.alk.cpik.trip

Values

Value Description
SHORT_RANGE This represent short range alert.
MEDIUM_RANGE This represent medium range alert.
LONG_RANGE This represent long range alert.

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

TurnArrowImage

Overview
Description An enum of the turn arrow images used by CoPilot.
Supported on Android Since Version 9.6.0.821
Platforms Supported Android, Linux
Type Enum
Package com.alk.cpik.trip

Values

ID Value V9 Image V10 Image
0 NONE
1 STRAIGHT ../img/image1 ./media/image1
2 TURN_LEFT ./media/image2 ./media/image2
3 TURN_RIGHT ./media/image3 ./media/image3
4 SLIGHT_LEFT ./media/image4 ./media/image4
5 SLIGHT_RIGHT ./media/image5 ./media/image5
6 SHARP_LEFT ./media/image6 ./media/image6
7 SHARP_RIGHT ./media/image7 ./media/image7
8 LEFTSIDE_UTURN ./media/image8 ./media/image8
9 WAYPOINT_FLAG ./media/image9 ./media/image10
10 START_POINT_FLAG ./media/image11 ./media/image12
11 END_POINT_FLAG ./media/image13 ./media/image14
12 ROUNDABOUT_LEFTSIDE_STRAIGHT ./media/image15 ./media/image15
13 ROUNDABOUT_LEFTSIDE_LEFT ./media/image16 ./media/image16
14 ROUNDABOUT_LEFTSIDE_RIGHT ./media/image17 ./media/image17
15 ROUNDABOUT_LEFTSIDE_SLIGHT_LEFT ./media/image18 ./media/image18
16 ROUNDABOUT_LEFTSIDE_SLIGHT_RIGHT ./media/image19 ./media/image19
17 ROUNDABOUT_LEFTSIDE_SHARP_LEFT ./media/image20 ./media/image20
18 ROUNDABOUT_LEFTSIDE_SHARP_RIGHT ./media/image21 ./media/image21
19 ROUNDABOUT_LEFTSIDE_UTURN ./media/image22 ./media/image22
20 ROUNDABOUT_RIGHTSIDE_STRAIGHT ./media/image23 ./media/image23
21 ROUNDABOUT_RIGHTSIDE_LEFT ./media/image24 ./media/image24
22 ROUNDABOUT_RIGHTSIDE_RIGHT ./media/image25 ./media/image25
23 ROUNDABOUT_RIGHTSIDE_SLIGHT_LEFT ./media/image26 ./media/image26
24 ROUNDABOUT_RIGHTSIDE_SLIGHT_RIGHT ./media/image27 ./media/image27
25 ROUNDABOUT_RIGHTSIDE_SHARP_LEFT ./media/image28 ./media/image28
26 ROUNDABOUT_RIGHTSIDE_SHARP_RIGHT ./media/image29 ./media/image29
27 ROUNDABOUT_RIGHTSIDE_UTURN ./media/image30 ./media/image30
28 RIGHTSIDE_UTURN ./media/image31 ./media/image31
29 MERGE_LEFT ./media/image32 ./media/image32
30 MERGE_RIGHT ./media/image33 ./media/image33
31 LEFTSIDE_OFFRAMP ./media/image34 ./media/image34
32 RIGHTSIDE_OFFRAMP ./media/image35 ./media/image35
33 INTERMEDIATE_STOP_FLAG ./media/image36 ./media/image37

Hooks and Callbacks

Hooks and Callbacks related to Guidance can be found below.

GuidanceListener
onArrivedAtStop
onTruckWarningUpdate
onOverSpeedLimitEvent
onCrossedCountryBorder
onSafetyCamUpdate
onShowLaneAssist
onHideLaneAssist
onETAChanged
onEstimatedTravelTimeUpdated
onDistanceToDestinationUpdated
onPositionUpdate
onTurnInstructionEvent
onTrafficInfoProcessedForCurrentRoute
onTrafficInforProcessedForAlternateRoute
onSpeedLimitChanged
onItineraryUpdated

Last update: July 2, 2020