본문 바로가기메인 메뉴 바로가기사이드 메뉴 바로가기

kakao developers

Related sites
  • Docs
  • Kakao Navi
  • Android

사이드 메뉴

Kakao Map

Search

Kakao Navi

Android

This document describes how to integrate the Kakao Navi API into your service with the Kakao SDK for Android ("Android SDK").

Before you begin

Check if Kakao Navi is installed

The Kakao Navi API provides the navigateIntent() function for navigation and the shareDestinationIntent() function for location sharing.

navigateIntent() and shareDestinationIntent() return Intent to invoke the navigation and location sharing function via the Kakao Navi app ("app"). If the Kakao Navi app is installed on a user's device, the app is launched. If not, the user should be directed to the download page for the Kakao Navi app.

To check if the Kakao Navi app is installed on a user's device, use the isKakaoNaviInstalled() method. Here is an example to check if the Kakao Navi app is installed.

if (NaviClient.instance.isKakaoNaviInstalled(context)) {
Log.i(TAG, "Possible to use navigation on Kakao Navi app.")
} else {
Log.i(TAG, "Kakao Navi app is not installed.")
}

Start navigation

Basic information
ReferenceApp setting
[SDK] navigateIntent()
[SDK] Location
[SDK] NaviOption
Install
Initialize

Starts directions from a user's current location to the entered destination.

End of support for Kakao Navi web version

  • From Android SDK 2.8.4, the feature to run directions on the web is no longer available if Kakao Navi is not installed.
  • If Kakao Navi is not installed, users are redirected to the installation page.
  • The web directions feature provided in previous versions will also be discontinued in the future, so updating to the latest version is recommended.

Request

Call the navigateIntent() method defined in the NaviClient class. You must pass destination as Location object that containing the destination information as an argument. You can also specify the desired search criteria using NaviOption.

Sample

// Navigation
if (NaviClient.instance.isKakaoNaviInstalled(requireContext())) {
// If Kakao Navi is installed, navigation starts on Kakao Navi with WGS84.
startActivity(
NaviClient.instance.navigateIntent(
Location("카카오 판교오피스", "127.108640", "37.402111"),
NaviOption(coordType = CoordType.WGS84)
)
)
} else {
// If Kakao Navi is not installed, open the download page for Kakao Navi.
startActivity(
Intent(
Intent.ACTION_VIEW,
Uri.parse(Constants.WEB_NAVI_INSTALL)
).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP)
)
}

Start navigation

Addtional feature

Waypoint

This API also provides a function to specify a list of waypoints. To add waypoints, pass viaList through Location object.

// Navigation
if (NaviClient.instance.isKakaoNaviInstalled(requireContext())) {
// If Kakao Navi is installed, navigation via waypoints starts on Kakao Navi with WGS84.
startActivity(
NaviClient.instance.navigateIntent(
Location("카카오 판교오피스", "127.108640", "37.402111"),
NaviOption(coordType = CoordType.WGS84),
// Set a list of waypoints.
listOf(
Location("판교역 1번출구", "127.111492", "37.395225")
)
)
)
} else {
// If Kakao Navi is not installed, open the download page for Kakao Navi.
startActivity(
Intent(
Intent.ACTION_VIEW,
Uri.parse(Constants.WEB_NAVI_INSTALL)
).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP)
)
}

Share location

Basic information
ReferenceApp setting
[SDK] shareDestinationIntent()
[SDK] Location
[SDK] NaviOption
Install
Initialize

Provides a screen to share the destination specified on the Kakao Navi app.

Request

Call the shareDestinationIntent() method in the NaviClient class, which returns Intent. You must pass destination as Location object containing the location information as an argument. You can also specify the desired search criteria using NaviOption.

Sample

// Sharing location
if (NaviClient.instance.isKakaoNaviInstalled(requireContext())) {
// If Kakao Navi is installed, location is shared on Kakao Navi with WGS84.
startActivity(
NaviClient.instance.shareDestinationIntent(
Location("카카오 판교오피스", "127.108640", "37.402111"),
NaviOption(coordType = CoordType.WGS84)
)
)
} else {
// If Kakao Navi is not installed, open the download page for Kakao Navi.
startActivity(
Intent(
Intent.ACTION_VIEW,
Uri.parse(Constants.WEB_NAVI_INSTALL)
).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP)
)
}

Share location

Additional feature

Waypoint

This API also provides a function to specify a list of waypoints. To share loacation with waypoints, pass viaList through Location object.

// Sharing location
if (NaviClient.instance.isKakaoNaviInstalled(requireContext())) {
// If Kakao Navi is installed, location is shared on Kakao Navi with WGS84.
startActivity(
NaviClient.instance.shareDestinationIntent(
Location("카카오 판교오피스", "127.108640", "37.402111"),
NaviOption(coordType = CoordType.WGS84),
// Set a list of waypoints.
listOf(
Location("판교역 1번출구", "127.111492", "37.395225")
)
)
)
} else {
// If Kakao Navi is not installed, open the download page for Kakao Navi.
startActivity(
Intent(
Intent.ACTION_VIEW,
Uri.parse(Constants.WEB_NAVI_INSTALL)
).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP)
)
}

Was this helpful?