페이지 이동경로
  • Docs>
  • Kakao Talk Share>
  • Android

Kakao Talk Share

Android

This document describes how to integrate Kakao Talk Share APIs into your service with the Kakao SDK for Android ("Android SDK").

Before you begin

Package query and interaction settings

This setting is only required when using Android SDK versions below 2.4.0. In Android 11, package query and interaction settings are required to send messages to Kakao Talk. If your app targets Android 11, you must add the queries element to AndroidManifest.xml as shown below. For details, see Package visibility in Android 11.

<manifest package="com.example.sample">
    <!--Add Kakao Talk package to queries-->
    <queries>
        <package android:name="com.kakao.talk" />
    </queries>
    ...
</manifest>

Choose implementation method

1. Select message sending feature

Kakao Developers provides two types of message sending features: Kakao Talk Share and Kakao Talk Message. Select the feature to use by referring to Message sending features. If you want to use Kakao Talk Share, check the content after Step 2.

2. Select message type and configuration method

Decide which message template to use by referring to Template types.

Decide how to configure a message by referring to Configuration method comparison. You can configure a message in object format based on predefined default templates or use custom templates configured directly for your service.

3. Send a message

Call the message sending API. If the request is successful, the Android SDK launches Kakao Talk or lets a user log in with Kakao Account on a web page, and then shows a list of friends or chatrooms. When a user selects friends or a chatroom to send the message to, the messages are sent to the selected targets.

How to check if Kakao Talk Share message transmission was successful

No value is returned when Kakao Talk Share is completed, and transmission success can be checked through Kakao Talk Share webhook.

Set custom URL scheme

To make your app launch when a user clicks a button in the Kakao Talk Share message, you need to set AndroidManifest.xml file with custom URL scheme (Custom URL Scheme). For apps targeting Android 12 (API 31) or higher, the exported element must be declared as true. See the example below.

<activity 
    android:name=".${YOUR_ACTIVITY_NAME}"
    android:exported="true">
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        
        <!--Used to set app execution scheme in the format "kakao${YOUR_NATIVE_APP_KEY}://kakaolink"-->
        <data android:host="kakaolink"
                android:scheme="kakao${YOUR_NATIVE_APP_KEY}" />
    </intent-filter>
</activity>
Note: Pass additional information when launching app

For native apps, you can pass additional information according to service needs when launching the app through custom URL scheme. You can set keys and values to pass when launching the app using androidExecutionParams and iosExecutionParams parameters. When using these parameters, clicking the app execution button in Kakao Talk Share message calls the following scheme.

kakao${YOUR_NATIVE_APP_KEY}://kakaolink?${androidExecutionParams}
kakao${YOUR_NATIVE_APP_KEY}://kakaolink?${iosExecutionParams}
// Example
kakao${YOUR_NATIVE_APP_KEY}://kakaolink?key1=value1&key2=value2&key3=value3

Send message with default template

Basic information
Reference App setting
[SDK, RxSDK] shareDefault()
[SDK] isKakaoTalkSharingAvailable()
[SDK] makeDefaultUrl()
[SDK] SharingResult
Install
Initialize
Permission Prerequisite Kakao Login Consent items
- Register platforms - -

This API enables you to share messages through Kakao Talk using predefined default templates.

Request

  1. Check if Kakao Talk is installed: To check if it is possible to share a message through Kakao Talk, first call isKakaoTalkSharingAvailable() to check if Kakao Talk is installed on the user's device.
    • If Kakao Talk is installed: Call shareDefault() to receive a SharingResult object. Use the intent of that object to launch an activity and implement sharing the message through Kakao Talk.
    • If Kakao Talk is not installed: Generate a web sharing URL using makeDefaultUrl() in WebSharerClient, then implement to open that URL in a default browser or webview.
  2. Configure message template: For message creation, implement the DefaultTemplate interface, then use one of the classes below according to the desired template type to configure template objects.
  3. Pass template object: When calling shareDefault() or makeDefaultUrl(), pass the previously configured template object as the defaultTemplate parameter.

Sample

Kotlin
RxKotlin
// Send feed message

// Check if Kakao Talk is installed
if (ShareClient.instance.isKakaoTalkSharingAvailable(context)) {    
    // Kakao Talk Share is available
    ShareClient.instance.shareDefault(context, defaultFeed) { sharingResult, error ->
        if (error != null) {
            Log.e(TAG, "Kakao Talk Share failed", error)
        }
        else if (sharingResult != null) {
            Log.d(TAG, "Kakao Talk Share success ${sharingResult.intent}")
            startActivity(sharingResult.intent)

            // Even if Kakao Talk Share succeeds, if the warning messages below exist, some content may not work properly.
            Log.w(TAG, "Warning Msg: ${sharingResult.warningMsg}")
            Log.w(TAG, "Argument Msg: ${sharingResult.argumentMsg}")
        }
    }
} else {
    // Kakao Talk not installed: Use web sharing
    // Web sharing example code
    val sharerUrl = WebSharerClient.instance.makeDefaultUrl(defaultFeed)

    // Open web browser with CustomTabs

    // 1. Open browser supporting CustomTabsServiceConnection
    // ex) Chrome, Samsung Internet, FireFox, Whale, etc.
    try {
        KakaoCustomTabsClient.openWithDefault(context, sharerUrl)
    } catch(e: UnsupportedOperationException) {
        // Exception handling when no browser supports CustomTabsServiceConnection
    }

    // 2. Open browser not supporting CustomTabsServiceConnection
    // ex) Daum, Naver, etc.
    try {
        KakaoCustomTabsClient.open(context, sharerUrl)
    } catch (e: ActivityNotFoundException) {
        // Exception handling when no internet browser is installed on the device
    }
}
var disposables = CompositeDisposable()

// Send feed message
ShareClient.rx.shareDefault(context, defaultFeed)
    .subscribeOn(Schedulers.io())
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe({ sharingResult ->
        Log.d(TAG, "Kakao Talk Share success ${sharingResult.intent}")
        startActivity(sharingResult.intent)

        // Even if Kakao Talk Share succeeds, if the warning messages below exist, some content may not work properly.
        Log.w(TAG, "Warning Msg: ${sharingResult.warningMsg}")
        Log.w(TAG, "Argument Msg: ${sharingResult.argumentMsg}")
    }, { error ->
        Log.e(TAG, "Kakao Talk Share failed ", error)
    })
    .addTo(disposables)

Send message with custom template

Basic information
Reference App setting
[SDK, RxSDK] shareCustom()
[SDK] isKakaoTalkSharingAvailable()
[SDK] SharingResult
[SDK] makeCustomUrl()
Install
Initialize
Permission Prerequisite Kakao Login Consent items
- Register platforms
Message template
- -

This API enables you to customize a template in [Tools] > [Message Template] and send a message through Kakao Talk. For message configuration methods, refer to Custom template.

Request

  1. Check if Kakao Talk is installed: To check if it is possible to share a message through Kakao Talk, first call isKakaoTalkSharingAvailable() to check if Kakao Talk is installed on the user's device.
    • If Kakao Talk is installed: Call shareCustom() to receive a SharingResult object. Use the intent of that object to launch an activity and implement sharing the message through Kakao Talk.
    • If Kakao Talk is not installed: Generate a web sharing URL using makeCustomUrl(), then implement to open that URL in a default browser or webview.
  2. Configure message template: Configure the message template in [Tools] > [Message Template]. For template configuration methods, refer to Custom template.
  3. Specify template: When calling shareCustom() or makeCustomUrl(), pass the template ID configured in the message template tool as the templateId parameter.
  4. Pass user arguments (optional): To include variable information in messages, add user arguments to the corresponding custom template, then pass keys and values as the templateArgs parameter. If you do not use this parameter even though the custom template includes user arguments, the part specified as user arguments will be exposed in the message as ${KEY} format.

Sample

Kotlin
RxKotlin
// Template ID created in [Tools] > [Message Template]
val templateId = templateIds["customMemo"] as Long

// Check if Kakao Talk is installed
if (ShareClient.instance.isKakaoTalkSharingAvailable(context)) {    
    // Kakao Talk Share is available
    ShareClient.instance.shareCustom(context, templateId) { sharingResult, error ->
        if (error != null) {
            Log.e(TAG, "Kakao Talk Share failed", error)
        }
        else if (sharingResult != null) {
            Log.d(TAG, "Kakao Talk Share success ${sharingResult.intent}")
            startActivity(sharingResult.intent)

            // Even if Kakao Talk Share succeeds, if the warning messages below exist, some content may not work properly.
            Log.w(TAG, "Warning Msg: ${sharingResult.warningMsg}")
            Log.w(TAG, "Argument Msg: ${sharingResult.argumentMsg}")
        }
    }
} else {
    // Kakao Talk not installed: Use web sharing
    // Web sharing example code
    val sharerUrl = WebSharerClient.instance.makeCustomUrl(templateId)

    // Open web browser with CustomTabs

    // 1. Open browser supporting CustomTabsServiceConnection
    // ex) Chrome, Samsung Internet, FireFox, Whale, etc.
    try {
        KakaoCustomTabsClient.openWithDefault(context, sharerUrl)
    } catch(e: UnsupportedOperationException) {
        // Exception handling when no browser supports CustomTabsServiceConnection
    }

    // 2. Open browser not supporting CustomTabsServiceConnection
    // ex) Daum, Naver, etc.
    try {
        KakaoCustomTabsClient.open(context, sharerUrl)
    } catch (e: ActivityNotFoundException) {
        // Exception handling when no internet browser is installed on the device
    }
}
var disposables = CompositeDisposable()

// Template ID created in [Tools] > [Message Template]
val templateId = templateIds["customMemo"] as Long

ShareClient.rx.shareCustom(context, templateId)
    .subscribeOn(Schedulers.io())
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe({ sharingResult ->
        Log.d(TAG, "Kakao Talk Share success ${sharingResult.intent}")
        startActivity(sharingResult.intent)

        // Even if Kakao Talk Share succeeds, if the warning messages below exist, some content may not work properly.
        Log.w(TAG, "Warning Msg: ${sharingResult.warningMsg}")
        Log.w(TAG, "Argument Msg: ${sharingResult.argumentMsg}")
    }, { error ->
        Log.e(TAG, "Kakao Talk Share failed ", error)
    })
    .addTo(disposables)

Send scrape message

Basic information
Reference App setting
[SDK, RxSDK] shareScrap()
[SDK] isKakaoTalkSharingAvailable()
[SDK] makeScrapUrl()
[SDK] SharingResult
Install
Initialize
Permission Prerequisite Kakao Login Consent items
- Register platforms - -

This API enables you to share a Kakao Talk message by scraping the specified web page and configuring a scrap message with the scraped information.

Request

  1. Check if Kakao Talk is installed: To check if it is possible to share a message through Kakao Talk, first call isKakaoTalkSharingAvailable() to check if Kakao Talk is installed on the user's device.
    • If Kakao Talk is installed: Call shareScrap() to receive a SharingResult object. Use the intent of that object to launch an activity and implement sharing the message through Kakao Talk.
    • If Kakao Talk is not installed: Generate a web sharing URL using makeScrapUrl() in WebSharerClient, then implement to open that URL in a default browser or webview.
  2. Specify web page URL for scraping: When calling shareScrap() or makeScrapUrl(), you must pass the URL of the web page to be scraped as the url parameter. The domain of the web page to be scraped must be registered in [App] > [General] > [Platform] > [Web] on the app management page.
  3. Apply custom template (optional): If you want to send scrape messages based on service-defined message templates, you must pass the ID of the template configured in [Tools] > [Message Template] as the templateId parameter. For template configuration methods, refer to Custom template. To include variable information in messages, use user arguments. In this case, you must pass keys and values as the templateArgs parameter.

Sample: Using default template

Kotlin
RxKotlin
// Web page URL to share
// * Note: The domain of the URL to share must be registered in the Web platform settings on the developer site.
val url = "https://developers.kakao.com"

// Check if Kakao Talk is installed
if (ShareClient.instance.isKakaoTalkSharingAvailable(context)) {    
    // Kakao Talk Share is available
    ShareClient.instance.shareScrap(context, url) { sharingResult, error ->
        if (error != null) {
            Log.e(TAG, "Kakao Talk Share failed", error)
        }
        else if (sharingResult != null) {
            Log.d(TAG, "Kakao Talk Share success ${sharingResult.intent}")
            startActivity(sharingResult.intent)

            // Even if Kakao Talk Share succeeds, if the warning messages below exist, some content may not work properly.
            Log.w(TAG, "Warning Msg: ${sharingResult.warningMsg}")
            Log.w(TAG, "Argument Msg: ${sharingResult.argumentMsg}")
        }
    }
} else {
    // Kakao Talk not installed: Use web sharing
    // Web sharing example code
    val sharerUrl = WebSharerClient.instance.makeScrapUrl(url)

    // Open web browser with CustomTabs

    // 1. Open browser supporting CustomTabsServiceConnection
    // ex) Chrome, Samsung Internet, FireFox, Whale, etc.
    try {
        KakaoCustomTabsClient.openWithDefault(context, sharerUrl)
    } catch(e: UnsupportedOperationException) {
        // Exception handling when no browser supports CustomTabsServiceConnection
    }

    // 2. Open browser not supporting CustomTabsServiceConnection
    // ex) Daum, Naver, etc.
    try {
        KakaoCustomTabsClient.open(context, sharerUrl)
    } catch (e: ActivityNotFoundException) {
        // Exception handling when no internet browser is installed on the device
    }
}
var disposables = CompositeDisposable()

// Web page URL to share
// * Note: The domain of the URL to share must be registered in the Web platform settings on the developer site.
val url = "https://developers.kakao.com"

ShareClient.rx.shareScrap(context, url)
    .subscribeOn(Schedulers.io())
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe({ sharingResult ->
        Log.d(TAG, "Kakao Talk Share success ${sharingResult.intent}")
        startActivity(sharingResult.intent)

        // Even if Kakao Talk Share succeeds, if the warning messages below exist, some content may not work properly.
        Log.w(TAG, "Warning Msg: ${sharingResult.warningMsg}")
        Log.w(TAG, "Argument Msg: ${sharingResult.argumentMsg}")
    }, { error ->
        Log.e(TAG, "Kakao Talk Share failed ", error)
    })
    .addTo(disposables)

Sample: Using custom template

Kotlin
RxKotlin
// Web page URL to share
// * Note: The domain of the URL to share must be registered in the Web platform settings on the developer site.
val url = "https://developers.kakao.com"
val templateId = templateIds["customMemo"] as Long

// Check if Kakao Talk is installed
if (ShareClient.instance.isKakaoTalkSharingAvailable(context)) {    
    // Kakao Talk Share is available
    ShareClient.instance.shareScrap(context, url, templateId) { sharingResult, error ->
        if (error != null) {
            Log.e(TAG, "Kakao Talk Share failed", error)
        }
        else if (sharingResult != null) {
            Log.d(TAG, "Kakao Talk Share success ${sharingResult.intent}")
            startActivity(sharingResult.intent)

            // Even if Kakao Talk Share succeeds, if the warning messages below exist, some content may not work properly.
            Log.w(TAG, "Warning Msg: ${sharingResult.warningMsg}")
            Log.w(TAG, "Argument Msg: ${sharingResult.argumentMsg}")
        }
    }
} else {
    // Kakao Talk not installed: Use web sharing
    // Web sharing example code
    val sharerUrl = WebSharerClient.instance.makeScrapUrl(url, templateId)

    // Open web browser with CustomTabs

    // 1. Open browser supporting CustomTabsServiceConnection
    // ex) Chrome, Samsung Internet, FireFox, Whale, etc.
    try {
        KakaoCustomTabsClient.openWithDefault(context, sharerUrl)
    } catch(e: UnsupportedOperationException) {
        // Exception handling when no browser supports CustomTabsServiceConnection
    }

    // 2. Open browser not supporting CustomTabsServiceConnection
    // ex) Daum, Naver, etc.
    try {
        KakaoCustomTabsClient.open(context, sharerUrl)
    } catch (e: ActivityNotFoundException) {
        // Exception handling when no internet browser is installed on the device
    }
}
var disposables = CompositeDisposable()

// Web page URL to share
// * Note: The domain of the URL to share must be registered in the Web platform settings on the developer site.
val url = "https://developers.kakao.com"
val templateId = templateIds["customMemo"] as Long

ShareClient.rx.shareScrap(context, url, templateId)
    .subscribeOn(Schedulers.io())
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe({ sharingResult ->
        Log.d(TAG, "Kakao Talk Share success ${sharingResult.intent}")
        startActivity(sharingResult.intent)

        // Even if Kakao Talk Share succeeds, if the warning messages below exist, some content may not work properly.
        Log.w(TAG, "Warning Msg: ${sharingResult.warningMsg}")
        Log.w(TAG, "Argument Msg: ${sharingResult.argumentMsg}")
    }, { error ->
        Log.e(TAG, "Kakao Talk Share failed ", error)
    })
    .addTo(disposables)

Set Kakao Talk Share webhook custom parameters

Kakao Talk Share webhook is a function to send a webhook request to the URL specified on Kakao Developers when a Kakao Talk Share message is successfully sent to friends or a chatroom selected by a user. This function is only available for Kakao Talk Share API, not for Kakao Talk Message API. Kakao Talk Share is sent by users through Kakao Talk, so services cannot directly confirm whether the message was sent successfully. Therefore, a webhook function is provided to notify when message transmission is successful.

To use this feature, you need to:

  1. Set the webhook URL and request method by referring to Prerequisites > Set Kakao Talk Share webhook.
  2. Build a server to receive a Kakao Talk Share webhook.
  3. Set a custom parameter to pass additional information when requesting the Kakao Talk Share API.
  4. Implement a process to handle the webhook delivered to your service server's webhook URL.

When your service server receives a Kakao Talk Share webhook, you can figure out additional information through the predefined custom parameters, such as what content the user has shared. The notification sent to the service server does not include detailed message transmission information, so you need to configure parameters with additional information needed by the service, such as which message's transmission result it is and what information the user shared. Even if you set up a Kakao Talk Share webhook in the app management page, the webhook will not be delivered if there are no custom parameters.

To use the Kakao Talk Share webhook function, you must specify a custom parameter through serverCallbackArgs. Otherwise, you cannot receive Kakao Talk Share webhooks even though you registered a webhook URL for Kakao Talk Share in [App] > [Webhook] > [Kakao Talk Share webhook] on the app management page. When your service server receives a Kakao Talk Share webhook, you can figure out additional information through the predefined custom parameters, such as what content the user has shared.

To pass additional information when requesting the Kakao Talk Share API, declare serverCallbackArgs, and pass keys and values as a Map. You cannot use the system reserved words CHAT_TYPE, HASH_CHAT_ID and TEMPLATE_ID as keys for the serverCallbackArgs. The key is included in the notification with the value defined in the specification of Kakao Talk Share webhook.

Below is an example of setting Kakao Talk Share webhook parameters.

Kotlin
RxKotlin
// Template ID created in [Tools] > [Message Template]
val templateId = templateIds["customMemo"] as Long

// Webhook parameter settings
val serverCallbackArgs = mapOf(templateId to "templateId")

// Check if Kakao Talk is installed
if (ShareClient.instance.isKakaoTalkSharingAvailable(context)) {    
    // Kakao Talk Share is available
    ShareClient.instance.shareCustom(context, templateId, serverCallbackArgs) { sharingResult, error ->
        if (error != null) {
            Log.e(TAG, "Kakao Talk Share failed", error)
        }
        else if (sharingResult != null) {
            Log.d(TAG, "Kakao Talk Share success ${sharingResult.intent}")
            startActivity(sharingResult.intent)

            // Even if Kakao Talk Share succeeds, if the warning messages below exist, some content may not work properly.
            Log.w(TAG, "Warning Msg: ${sharingResult.warningMsg}")
            Log.w(TAG, "Argument Msg: ${sharingResult.argumentMsg}")
        }
    }
} else {
    // Kakao Talk not installed: Use web sharing
    // Web sharing example code
    val sharerUrl = WebSharerClient.instance.makeCustomUrl(templateId, serverCallbackArgs)

    // Open web browser with CustomTabs

    // 1. Open browser supporting CustomTabsServiceConnection
    // ex) Chrome, Samsung Internet, FireFox, Whale, etc.
    try {
        KakaoCustomTabsClient.openWithDefault(context, sharerUrl)
    } catch(e: UnsupportedOperationException) {
        // Exception handling when no browser supports CustomTabsServiceConnection
    }

    // 2. Open browser not supporting CustomTabsServiceConnection
    // ex) Daum, Naver, etc.
    try {
        KakaoCustomTabsClient.open(context, sharerUrl)
    } catch (e: ActivityNotFoundException) {
        // Exception handling when no internet browser is installed on the device
    }
}
var disposables = CompositeDisposable()

// Template ID created in [Tools] > [Message Template]
val templateId = templateIds["customMemo"] as Long

// Webhook parameter settings
val serverCallbackArgs = mapOf(templateId to "templateId")

ShareClient.rx.shareCustom(context, templateId, serverCallbackArgs)
    .subscribeOn(Schedulers.io())
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe({ sharingResult ->
        Log.d(TAG, "Kakao Talk Share success ${sharingResult.intent}")
        startActivity(sharingResult.intent)

        // Even if Kakao Talk Share succeeds, if the warning messages below exist, some content may not work properly.
        Log.w(TAG, "Warning Msg: ${sharingResult.warningMsg}")
        Log.w(TAG, "Argument Msg: ${sharingResult.argumentMsg}")
    }, { error ->
        Log.e(TAG, "Kakao Talk Share failed ", error)
    })
    .addTo(disposables)

The parameters set above are passed to the notification sent to the service server's webhook URL in the form of request parameters. For the Kakao Talk Share webhook request details sent by Kakao, see Kakao Talk Share webhook.

Upload image

Basic information
Reference App setting
[SDK, RxSDK] uploadImage()
[SDK, RxSDK] scrapImage()
[SDK] ImageUploadResult
Install
Initialize
Permission Prerequisite Kakao Login Consent items
- Register platforms - -

You can attach images to a Kakao Talk message by passing an image URL when configuring a message template or uploading images in the Message Template Tool in advance. To use the image file stored on your device for a message, you must upload the image file to the server first to obtain its URL value.

If it is difficult to obtain the image file URL, you can either upload an image file to the Kakao server or scrape it. You can only upload an image with a file size of 5 MB or less. The images uploaded to the Kakao server are stored for up to 100 days and automatically deleted after the period.

Sample

Upload image
Kotlin
RxKotlin
// Upload image

// Local image file
// In this example, we used an image file added as a project resource.
// Prepare photo files needed for your service, such as from gallery.
val bitmap = BitmapFactory.decodeResource(resources, R.drawable.sample1)
val file = File(context.cacheDir, "sample1.png")
val stream = FileOutputStream(file)
bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream)
stream.close()

// Upload to Kakao image server
ShareClient.instance.uploadImage(file) { imageUploadResult, error ->
    if (error != null) {
        Log.e(TAG, "Image upload failed", error)
    }
    else if (imageUploadResult != null) {
        Log.i(TAG, "Image upload success \n${imageUploadResult.infos.original}")
    }
}
var disposables = CompositeDisposable()

// Upload image

// Local image file
// In this example, we used an image file added as a project resource.
// Prepare photo files needed for your service, such as from gallery.
val bitmap = BitmapFactory.decodeResource(resources, R.drawable.sample1)
val file = File(context.cacheDir, "sample1.png")
val stream = FileOutputStream(file)
bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream)
stream.close()

// Upload to Kakao image server
ShareClient.rx.uploadImage(file)
    .subscribeOn(Schedulers.io())
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe({ imageUploadResult ->
        Log.i(TAG, "Image upload success \n${imageUploadResult.infos.original}")
    }, { error ->
        Log.e(TAG, "Image upload failed", error)
    }).addTo(disposables)
Scrape image
Kotlin
RxKotlin
// Scrape image

// Original remote image URL
val url = "https://t1.kakaocdn.net/kakaocorp/Service/KakaoTalk/pc/slide/talkpc_theme_01.jpg"

// Upload to Kakao image server
ShareClient.instance.scrapImage(url) { imageUploadResult, error ->
    if (error != null) {
        Log.e(TAG, "Image scraping failed", error)
    }
    else if (imageUploadResult != null) {
        Log.i(TAG, "Image scraping success \n${imageUploadResult.infos.original}")
    }
}
var disposables = CompositeDisposable()

// Scrape image

// Original remote image URL
val url = "https://t1.kakaocdn.net/kakaocorp/Service/KakaoTalk/pc/slide/talkpc_theme_01.jpg"

// Upload to Kakao image server
ShareClient.rx.scrapImage(url)
    .subscribeOn(Schedulers.io())
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe({ imageUploadResult ->
        Log.i(TAG, "Image scraping success \n${imageUploadResult.infos.original}")
    }, { error ->
        Log.e(TAG, "Image scraping failed", error)
    }).addTo(disposables)

See more