KNSDK
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.
KNSDK provides three main features for using Kakao Navi: map, route, and guidance. These three features are separated into individual modules so that you can select and use only the features your service needs. For example, you can use the route module to check the estimated time of arrival (ETA), integrate the map module to display a route on the map, and integrate the guidance module to implement navigation.
Properties
| Name | Description | Type |
|---|---|---|
initSt | Authentication and initialization state | var initSt: KNSDKInitState |
delegate | Delegate that reports the status of the SDK | var delegate: KNSDKDelegate? |
Methods
install
Registers KNSDK in the Application class of the app to be used. An Android application has a single Application class, which you can use to declare classes or properties commonly used across the application.
fun install(application: Application, rootPath: String?): UnitParameters
| Name | Description |
|---|---|
application | The Application class of the app |
rootPath | The root path for managing KNSDK files |
sdkVersion
Returns the version of the KNSDK in use.
fun sdkVersion(): StringhandleWillResignActive
Notifies KNSDK when the application enters the paused state.
fun handleWillResignActive(): UnithandleDidEnterBackground
Notifies KNSDK when the application enters the background state.
fun handleDidEnterBackground(): UnithandleWillEnterForeground
Notifies KNSDK when the application enters the foreground state.
fun handleWillEnterForeground(): UnithandleDidBecomeActive
Notifies KNSDK when the application enters the resumed state. When the state is resumed, the paused state of voice guidance is released.
fun handleDidBecomeActive(): UnithandleWillTerminate
Notifies KNSDK when the application is terminated. If there is a route being driven at the time the application is terminated, its state value and route are saved.
fun handleWillTerminate(): UnithandleCarInterfaceConnected
Notifies KNSDK that the application has connected to an in-vehicle infotainment system.
fun handleCarInterfaceConnected(): UnithandleCarInterfaceDisconnected
Notifies KNSDK that the application has disconnected from the in-vehicle infotainment system.
fun handleCarInterfaceDisconnected(): UnitsetUserKey
Passes the key used to identify a user (UserKey) to KNSDK.
fun setUserKey(userKey: String?): UnitParameters
| Name | Description |
|---|---|
userKey | The UserKey used to identify a user. The key value is issued by the service, and KNSDK uses it to identify individual users and provide personalized services. |
localDataWithUpdateVersion
Returns the version of the downloaded map and the latest map version received from the server when KNSDK is initialized.
fun localDataWithUpdateVersion(): Pair<Int, Int>initializeWithAppKey
Initializes KNSDK.
TIP
You must initialize KNSDK before using it.
fun initializeWithAppKey(appKey: String, clientVersion: String, userKey: String? = null, langType: KNLanguageType = KNLanguageType.KNLanguageType_KOREAN, completion: ((error: KNError?) -> Unit)?): UnitParameters
| Name | Description |
|---|---|
appKey | The AppKey issued for using KNSDK |
userKey | The UserKey used to identify a user. The key value is issued by the service, and KNSDK uses it to identify individual users and provide personalized services. |
langType | Language setting |
completion | Delivers the result state after initialization is complete |
makeRendererWithFrame
Requests a map renderer. Internally, it binds and initializes the loader, styler, and renderer, then delivers the result.
fun makeRendererWithFrame(context: Context, mapTheme: KNMapTheme, width: Float = -1f, height: Float = -1f, surface: Surface): KNMapControlManager?bindingMapView
Requests a map view object. Internally, it binds and initializes the loader, styler, and renderer, then delivers the result.
TIP
The map view object must be created through KNSDK.
fun bindingMapView(mapView: KNMapView, mapTheme: KNMapTheme, completion: ((KNError?) -> Unit)?): Unit?makeTripWithStart
Creates a KNTrip.
fun makeTripWithStart(start: KNPOI, goal: KNPOI, vias: MutableList<KNPOI>?, csId: String? = null, completion: (error: KNError?, trip: KNTrip?) -> Unit): UnitParameters
| Name | Description |
|---|---|
start | Origin |
goal | Destination |
vias | List of waypoints |
csId | CS response identifier. Not currently used. |
completion | Route delivery block |
sharedGuidance
Gets the KNGuidance. Currently, only one KNGuidance exists.
fun sharedGuidance(): KNGuidance?sharedGpsManager
Gets the KNGPSManager. Currently, only one KNGPSManager exists.
fun sharedGpsManager(): KNGPSManager?reverseGeocodeWithPos
Returns the administrative dong address corresponding to a KATEC coordinate. The returned values are in the order of error code, administrative code, province (do) name, city/county/district (si/gun/gu) name, and neighborhood (dong) name, which are combined for use. Not all KATEC coordinates can be returned as addresses, and null may be returned as an intermediate value among the province name, city/county/district name, and neighborhood name.
fun reverseGeocodeWithPos(katecPos: IntPoint, inUiThread: Boolean = true, completion: ((error: KNError?, addrCode: String?, doName: String?, siGunGuName: String?, dongName: String?) -> Unit)?): UnitParameters
| Name | Description |
|---|---|
katecPos | The KATEC coordinate to be returned as an address |
inUiThread | Whether to return the result on the UI thread |
completion | The administrative dong address corresponding to the KATEC coordinate |
convertWGS84ToKATEC
Converts a WGS84 coordinate to a KATEC coordinate and returns it.
fun convertWGS84ToKATEC(wgs84Lon: Double, wgs84Lat: Double): FloatPointParameters
| Name | Description |
|---|---|
wgs84Lon | Longitude value of the WGS84 coordinate |
wgs84Lat | Latitude value of the WGS84 coordinate |
convertKATECToWGS84
Converts a KATEC coordinate to a WGS84 coordinate and returns it.
fun convertKATECToWGS84(katecX: Int, katecY: Int): DoublePointParameters
| Name | Description |
|---|---|
katecX | X value of the KATEC coordinate system |
katecY | Y value of the KATEC coordinate system |
requestLocationUpdate
Registers a receiver with KNGPSManager to receive location information. When location information is received, it is delivered through the registered receiver.
fun requestLocationUpdate(delegate: KNGPSReceiver): Unit?Parameters
| Name | Description |
|---|---|
delegate | The receiver to register |
removeLocationUpdate
Removes a receiver registered with KNGPSManager.
fun removeLocationUpdate(delegate: KNGPSReceiver): Unit?Parameters
| Name | Description |
|---|---|
delegate | The registered receiver |
reqPoiDetail
Queries and returns the detailed information of a point of interest (POI).
fun reqPoiDetail(idList: List<String>, completion: ((error: KNError?, poiDetailResult: KNPoiDetailResult?) -> Unit)?): Unit?Parameters
| Name | Description |
|---|---|
idList | List of point of interest (POI) IDs to get detailed information for |
completion | Returns the detailed information queried by POI ID. Returns an error on failure. |
reqSearch
Searches for places by keyword and returns the results. The keyword must be passed as complete (fully composed) characters.
fun reqSearch(keyword: String, pageNo: Int, pageSize: Int, request: KNSearchReqType, x: Int, y: Int, completion: ((error: KNError?, searchResult: KNSearchResult?) -> Unit)?): Unit?Parameters
| Name | Description |
|---|---|
keyword | The keyword to search (complete characters) |
pageNo | The start number of the search result page |
pageSize | The number of search results per page |
request | The search type |
x | The X coordinate of the current location for proximity-first search |
y | The Y coordinate of the current location for proximity-first search |
completion | Returns the search results queried by the search keyword. Returns an error on failure. |
reqPoiSearchAround
Searches for points of interest (POIs) within a specified radius centered on the search coordinate. The facility type of the queried POIs varies by category code.
fun reqPoiSearchAround(cCode: Int, fuelType: KNCarFuel, pos: FloatPoint, mbr: MBR, completion: ((error: KNError?, poiSearchAroundResult: KNPoiSearchAroundResult?) -> Unit)?): Unit?Parameters
| Name | Description |
|---|---|
cCode | The category code to search |
fuelType | The fuel type |
pos | The coordinate of the current location for proximity-first search |
mbr | The coordinate area to search |
completion | Returns the list of POIs matching the category code within the search coordinate area. Returns an error on failure. |
swapMapDb
Switches to the local map or the cloud map.
fun swapMapDb(completion: ((KNError?) -> Unit)?): UnitclearDBFile
Removes all downloaded map or cloud map files.
fun clearDBFile(completion: ((KNError?) -> Unit)?): UnitlocalMapDownload
Starts downloading the local map.
fun localMapDownload(onDownloadStateListener: OnDownloadStateListener, isAutoSwap: Boolean): OnKNDownloadCommandListener?Parameters
| Name | Description |
|---|---|
onDownloadStateListener | Returns the download state of the map file |
isAutoSwap | Whether to automatically switch the map database (DB) to the local map when the download is complete |
sharedConnection
Gets the KNConnection. Currently, only one KNConnection exists.
fun sharedConnection(): KNConnection?setPOIRatio
Sets the scale to adjust the size of points of interest (POIs) (minimum: 0.5, maximum: 2.0).
fun setPOIRatio(ratio: Float)setBuildingFlat
Sets whether to display buildings flat on the map (default: false).
fun setBuildingFlat(isBuildingFlat: Boolean)KNSDKRelease
Releases KNSDK.
fun KNSDKRelease()setAppUserId
Sets the appUserId used for user identification.
fun setAppUserId(AppUserId: String?)Parameters
| Name | Description |
|---|---|
AppUserId | User identification value |