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

kakao developers

Related sites
  • Docs
  • Android
  • Migrate v1 to v2

사이드 메뉴

Kakao Map

Search

Android

Migrate v1 to v2

This document guides information to upgrade Kakao SDK for Android("Android SDK") from v1(lower version of 2.0.0) to v2(version 2.0.0 or higher).

Module structure

The latest Android SDK has a simpler module structure compared to the Legacy Android SDK. The latest Android SDK provides the common module that contains the common and utility features and the Kakao Login function. In addition, each module provides APIs that are grouped by service under Client, and object and structure information is located in Model to make the Android SDK more efficient and convenient.

Notice when using token-based APIs

The token-based APIs refer to the APIs that require an access token through the Kakao Login. To use the token-based APIs in the latest Android SDK, implement Kakao Login that the user module provides.

API comparison by version

Common

  • Legacy SDK:
    • Set an app key in AndroidManifest.xml.
    • Call a function that initializes SDK through KakaoSDK.
    • Call a function that gets a key hash through Utility in the com.kakao.util package.
  • Latest SDK:
NameLegacy SDKSDK
Initializing Kakao SDKinit()init()
Getting a key hashgetKeyHash()getKeyHash()

Kakao Login

  • Legacy SDK:
    • Call the Login API through LoginActivity.
    • Call the Retrieve token information API through AuthService.
    • Call the Logout, Unlink, Retrieve user information, and Store user information APIs through Session.
    • Call the Retrieve shipping address and the Retrieve consent details for service terms APIs through UserManagement.
    • Call the Get consent to desired service terms API through LoginActivity.
  • Latest SDK:
    • Call the Kakao Login APIs through UserApiClient in the v2-user module, except for the Check token presence API.
    • Call the Check token presence API through AuthApiClient.
NameLegacy SDKSDK
Checking if Kakao Talk is installed-isKakaoTalkLoginAvailable()
Login with Kakao Talk-loginWithKakaoTalk(context)
Login with Kakao Account-loginWithKakaoAccount(context)
Check token presenceisOpened()hasToken()
LogoutrequestLogout()logout()
UnlinkrequestUnlink()unlink()
Retrieve token informationrequestAccessTokenInfo()accessTokenInfo()
Retrieve user informationme()me()
Retrieve shipping addressshippingAddresses()shippingAddresses()
Store user informationrequestUpdateProfile(properties)updateProfile()
Request additional consentupdateScopes(scopes)loginWithNewScopes(context, scopes)
Retrieve consent details for service termsserviceTerms()serviceTerms()
Get consent to desired service terms-loginWithKakaoTalk(context, serviceTerms)
loginWithKakaoAccount(context, serviceTerms)

Kakao Talk Social

  • Legacy SDK: Call the Kakao Talk Social APIs through KOSessionTask.
  • Latest SDK: Call the Kakao Talk Social APIs through TalkApiClient in the v2-talk module.
NameLegacy SDKSDK
Retrieve Kakao Talk profilerequestProfile()profile()
Retrieve list of friendsrequestAppFriends()friends()

Message: Kakao Talk Share

  • Legacy SDK:
    • Call the Kakao Talk Share APIs through KakaoLinkService.
    • If Kakao Talk is not installed on a user's device, a message is internally sent through a WebView.
  • Latest SDK:
    • Call the Kakao Talk Share APIs through ShareClient in the v2-share module.
    • Pass context for the Send message API.
    • If Kakao Talk is not installed on a user's device, implement a process to share URI through a WebView or a default browser.
Note

In Android SDK 2.11.0, the names of the module, classes, and methods related to Kakao Talk Share have been changed due to the change of its service name.

To see more detailed changes, see Version history.

NameLegacy SDKSDK
Checking if Kakao Talk is installed-isKakaoTalkSharingAvailable()
Sending with default templatesendDefault(template)shareDefault(context, defaultFeed)
Sending with custom templatesendCustomWithTemplateId(templateId)shareCustom(context, templateId)
Sending a scrap messagesendScrapWithURL(url)shareScrap(context, url)
Uploading an imageuploadImage(imageFile)uploadImage(file)
Scraping an imagescrapWithImageURL:imageURL:scrapImage(url)

Message: Kakao Talk Message

  • Legacy SDK: Call the Kakao Talk APIs through KakaoTalkService.
  • Latest SDK: Call the Kakao Talk APIs through TalkApiClient in the v2-talk module.
NameLegacy SDKSDK
Sending me with default templaterequestSendMemo(template)sendDefaultMemo(template)
Sending me with custom templaterequestSendMemo()sendCustomMemo(templateId)
Sending me a scrap messagerequestSendMemo(url)sendScrapMemo(url)
Sending friends with default templatesendMessageToFriends(template, uuids)sendDefaultMessage(template, receiverUuids)
Sending friends with custom templatesendMessageToFriends(templateId, uuids)sendCustomMessage(templateId, receiverUuids)
Sending friends a scrap messagesendMessageToFriend(url, uuids)sendScrapMessage(url, receiverUuids)

Kakao Talk Channel

  • Legacy SDK:
    • Call the Add Kakao Talk Channel and Kakao Talk Channel chat APIs through PlusFriendService.
    • Call the Check Kakao Talk Channel relationship API through KakaoTalkService.
  • Latest SDK:
    • Call the Add Kakao Talk Channel and Kakao Talk Channel chat APIs through TalkApiClient in the v2-talk module.
    • Call the Check Kakao Talk Channel relationship API after implementing Kakao Login.
NameLegacy SDKSDK
Add Kakao Talk ChanneladdFriend(plusFriendId)addChannelUrl(channelPublicId)
Starting Kakao Talk Channel chatchat(plusFriendId)channelChatUrl(channelPublicId)
Check Kakao Talk Channel relationshiprequestPlusFriends()channels()

Kakao Navi

  • Legacy SDK:
    • Call the Navi APIs through KakaoNaviService.
    • Call newBuilder() of each class and setNaviOptions() to set parameters.
  • Latest SDK:
    • Call the Navi APIs through NaviClient in the v2-navi module.
    • Define the constructor for each class to set parameters.
NameLegacy SDKSDK
Navigationnavigate(destination)navigateIntent(location, naviOption)
Getting URL for navigation-Deprecated navigateWebUrl(location, naviOption)
Sharing locationshareDestination(destination)shareDestinationIntent(location, naviOption)
Setting conditions for navigationnewBuilder()
setNaviOptions(options)
NaviOption()
Setting conditions for destination informationnewBuilder()
setNaviOptions(options)
Location()

Push Notification

  • Latest SDK: Not support Push Notification API. Push notifications is available with REST API.
NameLegacy SDKSDK
Register push tokenregisterPushToken(pushToken, deviceId)-
Retrieve push tokengetPushTokens()-
Delete push tokenderegisterPushToken(deviceId)-

Was this helpful?