KNGuidance
INFO
This English reference is based on Directions SDK with UI 1.12.8-hotfix02 (as of 2026-07-24). For the latest version, see the Korean reference.
Manages the route guidance feature and provides route information.
TIP
This class must be created through KNSDK.
Example code — KNGuidance
kotlin
class KNGuidance : KNGPSReceiver, KNLTEReceiverConstructor
Example code — Initialization
kotlin
// <init>
KNGuidance(application: Application)Properties
| Name | Description | Type |
|---|---|---|
excludedSafeties | Safe driving exclusion codes (default: null ) | var excludedSafeties: Set<Number>? |
guideImgType | Guidance image type (complex intersection) (default: KNGuideImgType_DayLarge ) | var guideImgType: KNGuideImgType |
guideState | Guidance state | var guideState: KNGuideState |
guideStateDelegate | Guidance state delegate. Called when the guidance state changes while driving; all callbacks are delivered on the main thread. | var guideStateDelegate: KNGuidance_GuideStateDelegate? |
locationGuide | Location guidance information including GPS data and location along the route (requires locationGuideDelegate to be set) | var altitude: Int |
locationGuideDelegate | Location guidance delegate. Called when the guidance location changes while driving; all callbacks are delivered on the main thread. | var locationGuideDelegate: KNGuidance_LocationGuideDelegate? |
multiRouteInfo | Branch point information of the multi-route | var multiRouteInfo: KNMultiRouteInfo? |
routeGuide | Information about the elements required for route guidance (requires routeGuideDelegate to be set) | var routeGuide: List<KNRoute>? |
routeGuideDelegate | Route guidance delegate. Called when the route guidance information changes while driving; all callbacks are delivered on the main thread. | var routeGuideDelegate: KNGuidance_RouteGuideDelegate? |
routesOnGuide | Current driving route. If route guidance is interrupted for reasons such as screen initialization, the last set information is loaded. | var routesOnGuide: List? |
safetyGuide | Information about the elements required for safe driving guidance (requires safetyGuideDelegate to be set) | var safetyGuide: KNGuide_Safety? |
safetyGuideDelegate | Safe driving delegate. Called when the safe driving information changes while driving; all callbacks are delivered on the main thread. | var safetyGuideDelegate: KNGuidance_SafetyGuideDelegate? |
sndContainer | Guidance voice setting. You can change the guidance voice by setting voice data that follows the Kakao Navi voice data format (default: default voice). When changing the voice data file provided by the Directions SDK with UI, the following file format must be observed — File format: .mp3, Bitrate: 128 kbit/s, Audio channel: monophonic sound. | var sndContainer: KNSoundContainer? |
trip | Route guidance route. Not used when using safe driving mode. | var trip: KNTrip? |
useBackgroundUpdate | Whether to update in the background. true : update, false : do not update (default: true ) | var useBackgroundUpdate: Boolean |
useDirSound | Whether to use direction voice guidance. true : use voice guidance, false : do not use voice guidance (default: true ) | var useDirSound: Boolean |
voiceGuideDelegate | Voice guidance delegate. Requests and delivers information related to the start and end of voice guidance; all callbacks are delivered on the main thread. | var voiceGuideDelegate: KNGuidance_VoiceGuideDelegate? |
aroundSafeties | Safe driving information around the current location. Not updated unless safetyGuideDelegate is set. | var aroundSafeties: List<KNSafety>? |
citsGuide | Recent C-ITS (Cooperative Intelligent Transport Systems) information. Not updated unless citsGuideDelegate is set. | var citsGuide: KNGuide_Cits? |
directionFreqModeNormalWay | Turn guidance frequency on normal roads | var directionFreqModeNormalWay: KNGuideFrequencyMode |
directionFreqModeHighWay | Turn guidance frequency on highways | var directionFreqModeHighWay: KNGuideFrequencyMode |
safetyFreqModeNormalWay | Safe driving guidance frequency on normal roads | var safetyFreqModeNormalWay: KNGuideFrequencyMode |
safetyFreqModeHighWay | Safe driving guidance frequency on highways | var safetyFreqModeHighWay: KNGuideFrequencyMode |
judgeOverSpeedAlert | Sets whether to sound a warning at locations with a speed enforcement camera. KNSafetyCode : safe driving data code, speedLimit : speed limit at the point (km/h), curSpeed : current vehicle speed (km/h), remainDist : remaining distance to the enforcement point (m), isHighway : whether it is a highway ( true / false ) | var judgeOverSpeedAlert: (KNSafetyCode, speedLimit: Int, curSpeed: Int, remainDist: Int, isHighway: Boolean) -> Boolean |
judgeOverSpeedViolation | Determines whether a speeding violation occurred | var judgeOverSpeedViolation: (KNSafetyCode, Int, Int) -> Boolean |
Methods
startWithTrip
Starts route guidance by setting the route and route options.
kotlin
fun startWithTrip(trip: KNTrip?, priority: KNRoutePriority, avoidOptions: Int): UnitParameters
| Name | Description |
|---|---|
trip | Route to use for driving |
priority | Items to prioritize when choosing a route during route guidance |
avoidOptions | Sections to avoid in the route |
stop
Ends route guidance. Any voice guidance in progress is also stopped immediately. After ending, it does not switch to safe driving mode.
kotlin
fun stop(): Unit