Skip to main content

GuidanceMgr - Navigation (CPIK Libraries)

Contents

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

Return Value

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

Sample Code


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

Return Value

A LaneAssistInfo object with the current lane assist information.

Sample Code


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

Return Value

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

Sample Code


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

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


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

Return Value

A Road object containing information about the current road.

Sample Code


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

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


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

Return Value

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

Sample Code


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

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


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

Return Value

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

Sample Code


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

Return Value

A Date object indicating the estimated time of arrival.

Sample Code


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

Return Value

A list representing each ItineraryInfo object.

Sample Code


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

Return Value

Singleton instance of the CoPilot GPS Device.

Sample Code


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

Sample Code


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

Return Value

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

Sample Code


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

Sample Code


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

Return Value

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

Sample Code


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

Sample Code


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

Return Value

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

Sample Code


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

Parameters

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

Sample Code


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

Return Value

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

Sample Code


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

Parameters

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

Sample Code


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

Return Value

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

Sample Code


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

Parameters

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

Return Value


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

Return Value

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

Sample Code


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

Parameters

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

Sample Code


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

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


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

Parameters

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

Sample Code


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

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


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

Parameters

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

Sample Code


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

Return Value

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

Sample Code


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

Parameters

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

Sample Code


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.

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.

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


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

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.

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