{"id":27689464,"url":"https://github.com/sendbird/sendbird-supportchat-sample-android","last_synced_at":"2025-06-10T09:35:08.514Z","repository":{"id":156965435,"uuid":"622833342","full_name":"sendbird/sendbird-supportchat-sample-android","owner":"sendbird","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-27T04:24:51.000Z","size":436,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-25T10:11:40.543Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sendbird.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-03T06:50:03.000Z","updated_at":"2023-04-04T01:45:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"2632cb1d-ba15-4901-8584-3e23fd4b9ca3","html_url":"https://github.com/sendbird/sendbird-supportchat-sample-android","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendbird%2Fsendbird-supportchat-sample-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendbird%2Fsendbird-supportchat-sample-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendbird%2Fsendbird-supportchat-sample-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendbird%2Fsendbird-supportchat-sample-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sendbird","download_url":"https://codeload.github.com/sendbird/sendbird-supportchat-sample-android/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendbird%2Fsendbird-supportchat-sample-android/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259048683,"owners_count":22797782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-25T10:11:01.270Z","updated_at":"2025-06-10T09:35:08.505Z","avatar_url":"https://github.com/sendbird.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sendbird Support Chat Sample for Android\nThis is an example of [Sendbird Support Chat](https://sendbird.com/docs/support-chat/v1/overview) for Android, implemented using [Sendbird UIKit](https://sendbird.com/docs/uikit/v3/android/overview).\n\u003cp\u003e\nSendbird Support Chat: Salesforce Connector is a Sendbird Chat integration into your existing Salesforce Service Cloud that offers support focused chat experience with vast new features for agent productivity. With this Support Chat Salesforce sample app, you can quick start your client-side implementation.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg\n    src=\"./channel_list.png\"\n    width=\"250\"\n  /\u003e\n  \u003cimg\n    src=\"./channel.png\"\n    width=\"250\"\n  /\u003e\n  \u003cimg\n    src=\"./channel_info.png\"\n    width=\"250\"\n  /\u003e\n\u003c/p\u003e\n\n\n## Getting Started\n1. Create your Sendbird application on [the dashboard](https://dashboard.sendbird.com/auth/signup).\n2. [Install the Salesforce Connector package](https://sendbird.com/docs/support-chat/v1/salesforce-connector/integrate-with-salesforce-service-cloud) in your Salesforce organization. Please complete the necessary configuration by following the documentation.\n3. In this example, we're connecting to a test purpose Sendbird application and a Salesforce organization. To connect yours, replace `APP_ID` and others in the `BaseApplication.kt` file as follows:\n\n```kotlin\nclass BaseApplication : Application() {\n    companion object {\n        // TODO Replace with your own APP_ID\n        const val APP_ID = \"13B6D179-33A5-4C0D-9162-E11DAC9358FC\"\n\n        // TODO Replace with your own USER_ID\n        const val USER_ID = \"sendbird\"\n\n        // TODO Replace with your own NICKNAME\n        const val NICKNAME = \"sendbird\"\n\n        // TODO Replace with your own PROFILE_URL\n        const val PROFILE_URL = \"\"\n\n        // ...\n    }\n\n    // ...\n}\n\n```\n4. Run `app`\n\n## How to connect a channel to a case\nIn this example, we built a simple serverless endpoint on the Salesforce side to create a case. You can use the most popular way, the [Salesforce Rest API](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_rest.htm), or refer to [our documentation](https://sendbird.com/docs/support-chat/v1/salesforce-connector/integrate-with-salesforce-service-cloud#2-step-5-client-side-implementation-3-create-a-case-through-apex-rest-api) to create a simple endpoint. To connect a channel to a case, you can do the following:\n\n1. Create a channel with custom type: `SALESFORCE_SUPPORT_CHAT_CHANNEL`\n\n```kotlin\nprivate fun createGroupChannel(title: String) {\n    val params = GroupChannelCreateParams()\n    params.customType = \"SALESFORCE_SUPPORT_CHAT_CHANNEL\"\n    params.userIds = listOf(SendbirdUIKit.getAdapter().userInfo.userId)\n    // optional\n    params.name = title\n    // optional\n    params.coverImage = createUserAgentCoverImage()\n    GroupChannel.createChannel(params) { groupChannel, e -\u003e\n        if (e != null) {\n            toastError(\"Couldn't start support chat\")\n            return@createChannel\n        } else if (groupChannel != null) {\n            startChat(groupChannel)\n        }\n    }\n}\n```\n\n2. Create a case with fields from Salesforce Connector.\n\n\n```kotlin\nprivate fun startChat(channel: GroupChannel) {\n    val json = \"{\\\"subject\\\":\\\"${channel.name}\\\",\" +\n            \"\\\"suppliedName\\\":\\\"${SendbirdUIKit.getAdapter().userInfo.nickname}\\\",\" +\n            \"\\\"sendbirdUserId\\\":\\\"${SendbirdUIKit.getAdapter().userInfo.userId}\\\",\" +\n            \"\\\"sendbirdChannelURL\\\":\\\"${channel.url}\\\",\" +\n            \"\\\"isEinsteinBotCase\\\":false}\"\n    val body = json.toRequestBody(\"application/json; charset=utf-8\".toMediaType())\n\n    val request = Request.Builder()\n        .url(\"https://sendbird11-dev-ed.develop.my.salesforce-sites.com/services/apexrest/cases/\")\n        .post(body)\n        .build()\n\n    val client: OkHttpClient = OkHttpClient.Builder().addInterceptor(\n        Interceptor { chain: Interceptor.Chain -\u003e\n            chain.proceed(\n                chain.request().newBuilder()\n                    .addHeader(\"Content-Type\", \"application/json\")\n                    .build()\n            )\n        }).build()\n\n    client.newCall(request).enqueue(object : Callback {\n        override fun onFailure(call: Call, e: IOException) {\n            leaveChannel(channel)\n            toastError(\"Couldn't start support chat\")\n        }\n\n        override fun onResponse(call: Call, response: Response) {\n            if (response.code == 200) {\n                val context = this@CustomChannelListFragment.context\n                if (context != null) {\n                    startActivity(ChannelActivity.newIntent(context, channel.url))\n                }\n            } else {\n                leaveChannel(channel)\n                toastError(\"Couldn't start support chat\")\n            }\n        }\n    })\n}\n```\n\nFor more information, see [our documentation](https://sendbird.com/docs/support-chat/v1/salesforce-connector/integrate-with-salesforce-service-cloud#2-step-5-client-side-implementation).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsendbird%2Fsendbird-supportchat-sample-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsendbird%2Fsendbird-supportchat-sample-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsendbird%2Fsendbird-supportchat-sample-android/lists"}