Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"source": "git-subdir",
"url": "https://github.com/sendbird/sendbird-client-plugin.git",
"path": "plugins/sendbird-client",
"ref": "v0.1.42"
"ref": "v0.1.43"
},
"description": "Sendbird integration helper for Chat (incl. auth/session), UIKit, and Calls across iOS, Android, and JS. Includes hooks that run local shell scripts; see README \"What runs on your machine\"."
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/sendbird-client/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sendbird-client",
"displayName": "Sendbird Client",
"version": "0.1.42",
"version": "0.1.43",
"description": "Sendbird integration helper for Chat (incl. auth/session), UIKit, and Calls across iOS, Android, and JS",
"author": {
"name": "Sendbird",
Expand Down
2 changes: 1 addition & 1 deletion plugins/sendbird-client/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sendbird-client",
"version": "0.1.42",
"version": "0.1.43",
"description": "Sendbird integration helper for Chat (incl. auth/session), UIKit, and Calls across iOS, Android, and JS",
"author": {
"name": "Sendbird",
Expand Down
7 changes: 6 additions & 1 deletion plugins/sendbird-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> Generated by `tools/editions/build.sh` from the repository root. Do not edit this folder;
> change the root and rerun the build.

`sendbird-client` v0.1.42 — Sendbird integration helper for Chat (incl. auth/session), UIKit, and Calls across iOS, Android, and JS.
`sendbird-client` v0.1.43 — Sendbird integration helper for Chat (incl. auth/session), UIKit, and Calls across iOS, Android, and JS.

## Products

Expand All @@ -29,11 +29,16 @@ codex plugin add sendbird-client@sendbird

- `/sendbird-client:add-feature`
- `/sendbird-client:auth-recipes`
- `/sendbird-client:calls-incoming`
- `/sendbird-client:diagnose-channel`
- `/sendbird-client:docs-search`
- `/sendbird-client:explain-error`
- `/sendbird-client:fix-build`
- `/sendbird-client:performance-audit`
- `/sendbird-client:permissions-setup`
- `/sendbird-client:push-setup`
- `/sendbird-client:setup`
- `/sendbird-client:start-chat`
- `/sendbird-client:trace-sdk`
- `/sendbird-client:ui-customize`
- `/sendbird-client:verify-integration`
Expand Down
2 changes: 1 addition & 1 deletion plugins/sendbird-client/config/plugin-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"schemaVersion": "0.1.42",
"schemaVersion": "0.1.43",
"knowledge": {
"mode": "runtime-fetch",
"_modes": [
Expand Down
2 changes: 1 addition & 1 deletion plugins/sendbird-client/core/index.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"generatedAt": "2026-10-14T18:33:49Z",
"generatedAt": "2026-10-14T19:23:16Z",
"count": 48,
"entries": [
{
Expand Down
2 changes: 1 addition & 1 deletion plugins/sendbird-client/hooks/welcome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -euo pipefail
ROOT="${CLAUDE_PLUGIN_ROOT:-$(cd "$(dirname "$0")/.." && pwd)}"
cat <<EOF
Sendbird Client plugin loaded. Skills: /sendbird-client:setup, add-feature, auth-recipes, ui-customize, verify-integration, explain-error, performance-audit, push-setup, docs-search, trace-sdk
Sendbird Client plugin loaded. Skills: /sendbird-client:setup, add-feature, auth-recipes, ui-customize, verify-integration, explain-error, performance-audit, push-setup, docs-search, trace-sdk, diagnose-channel, fix-build, start-chat, calls-incoming, permissions-setup

Plugin root: $ROOT — use this path wherever an instruction says \${CLAUDE_PLUGIN_ROOT} and that variable is empty in your shell (Codex does not set it for shell commands).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
- **Fix:** Call `SendbirdUIKit.init(...)` in `Application.onCreate` and register that class in the manifest. In your own screens, create channels only from the success callback of `SendbirdUIKit.connect(...)` or `SendbirdChat.connect(...)`; calling earlier fails with `ERR_CONNECTION_REQUIRED` (800101). (source: knowledge/curated/android/setup.md — Init) (source: https://sendbird.com/docs/chat/uikit/v3/android-view/essentials/authentication) (source: https://github.com/sendbird/sendbird-uikit-android/blob/07ffe8efc97e2d71dedc466ad868df817e5f433e/uikit/src/main/java/com/sendbird/uikit/SendbirdUIKit.java#L267 — `init` at line 267, `connect` at line 557) (source: https://github.com/sendbird/sendbird-uikit-android/blob/07ffe8efc97e2d71dedc466ad868df817e5f433e/uikit/src/main/res/values/strings.xml#L118 — `sb_text_error_get_channel`) (source: https://sendbird.com/docs/chat/sdk/v4/android/error-codes) (source: knowledge/curated/android/cross-cutting/errors.md)
- **Cases:** https://community.sendbird.com/t/uikit-2-2-4-couldnt-retrieve-channel-toast/4650, https://community.sendbird.com/t/please-help-me-on-this/2382

### Manifest merger fails on a `FileProvider` (`provider@authorities` or `FILE_PROVIDER_PATHS`) after adding UIKit
- **Cause:** Older UIKit releases declared the plain `androidx.core.content.FileProvider` in their manifest, with the authority `${applicationId}.provider` and the paths file `@xml/sb_file_paths` (quoted from UIKit 2.1.5 in the first case). The manifest merger matches `<provider>` elements by `android:name`, so an app or another library that declared the same class collided with it (Sendbird staff explanation in the first case; the second case shows the same error with UIKit 3.3.3).
- **Fix:** Upgrade UIKit. The 3.5.4 release notes list "Improved FileProvider compatibility" (source: https://github.com/sendbird/sendbird-uikit-android/blob/07ffe8efc97e2d71dedc466ad868df817e5f433e/CHANGELOG.md#L338-L341). In 3.26.3 the AAR manifest declares its own class, `com.sendbird.uikit.model.SendbirdUIKitFileProvider`, with the authority `${applicationId}.sendbird.uikit.provider`, so it no longer shares a merge key with an app's `androidx.core.content.FileProvider` (source: uikit-3.26.3.aar AndroidManifest.xml lines 153-161).
- **Cases:** https://community.sendbird.com/t/sendbird-uikit-using-androidx-core-content-fileprovider-directly/2687, https://community.sendbird.com/t/fileprovider-manifest-merger-conflict-with-other-dependencies/6393

## Connection and auth

### `connect` fails with 400302, or a user who used to connect without a token is now rejected
Expand Down
29 changes: 29 additions & 0 deletions plugins/sendbird-client/knowledge/curated/android/hosts/compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,35 @@ class UniqueTokenMessagingService : SendbirdPushHandler() {
```
(source: https://sendbird.com/docs/chat/uikit/v3/jetpack-compose/essentials/push-notifications) (source: sendbird-chat-4.36.4.aar javap -c com.sendbird.android.push.SendbirdPushHandler — `onTokenUpdated` calls `isUniquePushToken()` and passes it to `SendbirdPushHelper.registerPushToken`) (source: knowledge/curated/android/cross-cutting/push.md)

## Start a 1:1 chat from a button (Compose UIKit)
Create the channel with the Chat SDK and `isDistinct = true` (knowledge/curated/android/products/chat.md, "Create and list group channels"), then call `navController.navigateToChannel(url)` on the `NavController` whose `NavHost` contains `sendbirdGroupChannelNavGraph(navController)`. The same call opens a channel from a push tap once you have its channel URL (the payload is in knowledge/curated/android/cross-cutting/push.md). The template `templates/android/compose/uikit/UikitComposeApp.kt` builds that `NavHost`.

```kotlin
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.navigation.NavController
import com.sendbird.android.channel.GroupChannel
import com.sendbird.android.params.GroupChannelCreateParams
import com.sendbird.uikit.compose.navigation.navigateToChannel

@Composable
fun ChatWithSellerButton(navController: NavController, sellerUserId: String) {
Button(onClick = {
val params = GroupChannelCreateParams().apply {
userIds = listOf(sellerUserId)
isDistinct = true // same members -> the existing channel comes back
}
GroupChannel.createChannel(params) { channel, e ->
if (e == null && channel != null) navController.navigateToChannel(channel.url)
}
}) {
Text("Chat with seller")
}
}
```
(source: https://sendbird.com/docs/chat/uikit/v3/jetpack-compose/navigation) (source: knowledge/curated/android/products/chat.md — Create and list group channels) (uikit-compose 1.3.6 AAR `javap` on `com.sendbird.uikit.compose.navigation.NavigationKt`: `navigateToChannel(NavController, String)`, `sendbirdGroupChannelNavGraph`; also templates/android/compose/uikit/UikitComposeApp.kt, compile-checked)

## Related
- View host: knowledge/curated/android/hosts/view.md
- AI Agent: knowledge/curated/android/products/ai-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,60 @@ SendBirdCall.addListener(UNIQUE_HANDLER_ID, new SendBirdCallListener() {
```
(source: sendbird-calls 1.12.4 — `SendBirdCallListener` has TWO required abstract methods, `onRinging(DirectCall)` + `onInvitationReceived(RoomInvitation)`, verified via javap of the published AAR 2026-06-22. `RoomInvitation` = `com.sendbird.calls.RoomInvitation`.)

## Receive calls in the background or after the app was closed (FCM)
A device without a live Calls connection gets incoming calls through FCM. The docs' steps: upload the FCM service account key in the dashboard, register the FCM token with `SendBirdCall.registerPushToken(...)` from `onNewToken` (the overload to use is below), and pass every FCM message to `SendBirdCall.handleFirebaseMessageData(remoteMessage.getData())`, which returns `true` for a Calls push and `false` for any other push. (source: https://sendbird.com/docs/calls/sdk/v1/android/features/push-notifications)

The SDK then raises `onRinging` on a listener added with `SendBirdCall.addListener(...)`. When FCM starts the app process, only `Application.onCreate` has run, so the public Direct Call QuickStart calls `SendBirdCall.init(...)` and adds the listener there. Its FCM service registers the token only when `SendBirdCall.currentUser` is set and otherwise saves it for after sign-in. (source: https://github.com/sendbird/quickstart-calls-directcall-android/blob/1e8cf929f0a891b93bc31ed9b394525a209520ac/directcall-kotlin/app/src/main/java/com/sendbird/calls/quickstart/BaseApplication.kt#L27-L61) (source: https://github.com/sendbird/quickstart-calls-directcall-android/blob/1e8cf929f0a891b93bc31ed9b394525a209520ac/directcall-kotlin/app/src/main/java/com/sendbird/calls/quickstart/fcm/MyFirebaseMessagingService.kt#L12-L31)

```kotlin
import android.app.Application
import com.google.firebase.messaging.FirebaseMessagingService
import com.google.firebase.messaging.RemoteMessage
import com.sendbird.calls.DirectCall
import com.sendbird.calls.RoomInvitation
import com.sendbird.calls.SendBirdCall
import com.sendbird.calls.SendBirdException
import com.sendbird.calls.handler.CompletionHandler
import com.sendbird.calls.handler.SendBirdCallListener
import com.sendbird.calls.internal.PushTokenType

class CallsApplication : Application() {
override fun onCreate() {
super.onCreate()
// Runs again when FCM starts the process for an incoming call.
if (SendBirdCall.init(applicationContext, APP_ID)) {
SendBirdCall.addListener("incoming-calls", object : SendBirdCallListener() {
override fun onRinging(call: DirectCall) {
// Show the incoming-call UI (see the notification notes below).
}
override fun onInvitationReceived(invitation: RoomInvitation) {}
})
}
}
}

class CallsMessagingService : FirebaseMessagingService() {
override fun onMessageReceived(remoteMessage: RemoteMessage) {
if (SendBirdCall.handleFirebaseMessageData(remoteMessage.data)) return
// Not a Calls push: handle your other notifications here.
}

override fun onNewToken(token: String) {
if (SendBirdCall.currentUser == null) return // register after authenticate instead
SendBirdCall.registerPushToken(token, PushTokenType.FCM_VOIP, false, object : CompletionHandler {
override fun onResult(e: SendBirdException?) {}
})
}
}
```

The three-argument `registerPushToken(token, unique, handler)` shown on the docs page is deprecated since 1.11.0; the compiler names the replacement, `registerPushToken(pushToken, pushTokenType, unique, handler)`, and the QuickStart passes `PushTokenType.FCM_VOIP` (`com.sendbird.calls.internal.PushTokenType`, values `FCM_VOIP` and `HMS_VOIP`). (source: https://github.com/sendbird/quickstart-calls-directcall-android/blob/1e8cf929f0a891b93bc31ed9b394525a209520ac/directcall-kotlin/app/src/main/java/com/sendbird/calls/quickstart/utils/PushUtils.kt#L34-L50) (sendbird-calls 1.12.5 `javap -public com.sendbird.calls.SendBirdCall`: `init(Context, String)` returns boolean, `getCurrentUser()`, `registerPushToken(String, PushTokenType, boolean, CompletionHandler)`, `addListener(String, SendBirdCallListener)`, `handleFirebaseMessageData(Map<String, String>)` returns boolean; `SendBirdCallListener` is an abstract class with `onRinging(DirectCall)` and `onInvitationReceived(RoomInvitation)`; `CompletionHandler.onResult(SendBirdException)`; deprecation message from `compile-snippets-android.sh`)

**Showing the ringing call.** The SDK does not draw a notification for you; the QuickStart does it in its own foreground service (`CallService`):
- `onRinging` starts the service with `startForegroundService`. The service posts a `NotificationCompat.CATEGORY_CALL` notification with `PRIORITY_HIGH` on an `IMPORTANCE_HIGH` channel, with accept and decline actions and `setFullScreenIntent(...)` for the ringing screen. (source: https://github.com/sendbird/quickstart-calls-directcall-android/blob/1e8cf929f0a891b93bc31ed9b394525a209520ac/directcall-kotlin/app/src/main/java/com/sendbird/calls/quickstart/call/CallService.kt#L83-L139)
- It calls `startForeground` with `FOREGROUND_SERVICE_TYPE_PHONE_CALL` while ringing, and adds `FOREGROUND_SERVICE_TYPE_MICROPHONE` only after the call connects. The sample's comment says that including the microphone type while the app is still in the background throws a `SecurityException` on Android 15+. (source: https://github.com/sendbird/quickstart-calls-directcall-android/blob/1e8cf929f0a891b93bc31ed9b394525a209520ac/directcall-kotlin/app/src/main/java/com/sendbird/calls/quickstart/call/CallService.kt#L150-L167)
- Its manifest declares `FOREGROUND_SERVICE`, `FOREGROUND_SERVICE_PHONE_CALL`, `FOREGROUND_SERVICE_MICROPHONE`, `POST_NOTIFICATIONS`, `USE_FULL_SCREEN_INTENT`, `WAKE_LOCK` and `MANAGE_OWN_CALLS`, and registers the service with `android:foregroundServiceType="phoneCall|microphone"`. (source: https://github.com/sendbird/quickstart-calls-directcall-android/blob/1e8cf929f0a891b93bc31ed9b394525a209520ac/directcall-kotlin/app/src/main/AndroidManifest.xml#L7-L93)

## Make a call
```java
DialParams params = new DialParams(CALLEE_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,38 @@ The header applies the appearance and then sets a fixed text size (`HeaderView.k

**Long channel names are cut to one line.** This is the layout, not a bug: the channel list row title is `singleLine` with `ellipsize="end"` (`sb_view_channel_list_item.xml` line 32-40), and the channel header title is `maxLines="1"` with `ellipsize="end"` (`sb_view_header.xml` line 54-59). To show more of the name, render the row with a custom channel item (see "Channel list" above) or the header with a custom `ChannelHeaderComponent`. (source: https://github.com/sendbird/sendbird-uikit-android/blob/main/uikit/src/main/res/layout/sb_view_channel_list_item.xml#L32-L40) (source: https://github.com/sendbird/sendbird-uikit-android/blob/main/uikit/src/main/res/layout/sb_view_header.xml#L54-L59) (community context: https://github.com/sendbird/sendbird-uikit-android/discussions/28)

## Start a 1:1 chat from a button (no channel list)
For a "Chat with seller" button: create the channel with `isDistinct = true`, which returns the existing 1:1 channel when one already has the same members, and start `ChannelActivity` for its URL. Back returns to your screen. To open the same channel from a notification tap, the public UIKit sample builds the notification's `PendingIntent` from a redirect intent; `ChannelListActivity.newRedirectToChannelIntent(context, channelUrl)` opens the list and moves into the channel, so back lands on the list.

```kotlin
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import com.sendbird.android.channel.GroupChannel
import com.sendbird.android.params.GroupChannelCreateParams
import com.sendbird.uikit.activities.ChannelActivity
import com.sendbird.uikit.activities.ChannelListActivity

fun Activity.openChatWith(sellerUserId: String) {
val params = GroupChannelCreateParams().apply {
userIds = listOf(sellerUserId)
isDistinct = true // same members -> the existing channel comes back
}
GroupChannel.createChannel(params) { channel, e ->
if (e != null || channel == null) return@createChannel
startActivity(ChannelActivity.newIntent(this, channel.url))
}
}

// In your push handler: data["sendbird"] is JSON whose channel object holds channel_url.
fun channelTapIntent(context: Context, channelUrl: String, requestCode: Int): PendingIntent {
val intent = ChannelListActivity.newRedirectToChannelIntent(context, channelUrl)
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
return PendingIntent.getActivity(context, requestCode, intent, PendingIntent.FLAG_IMMUTABLE)
}
```
(source: knowledge/curated/android/products/chat.md — Create and list group channels) (source: https://github.com/sendbird/sendbird-uikit-android/blob/07ffe8efc97e2d71dedc466ad868df817e5f433e/uikit-samples/src/main/java/com/sendbird/uikit/samples/common/fcm/MyFirebaseMessagingService.kt#L54-L117 — reads `data["sendbird"]`, takes the channel URL, and builds the tap `PendingIntent` from a redirect intent with `FLAG_ACTIVITY_CLEAR_TOP`) (uikit 3.26.3 AAR `javap` on `com.sendbird.uikit.activities.ChannelActivity` and `com.sendbird.uikit.activities.ChannelListActivity`: `newIntent(Context, String)`, `newRedirectToChannelIntent(Context, String)`)

## Message menu and message taps (View host)
A long press on a message opens the message menu, which `makeMessageContextMenu(message)` builds as a list of `DialogListItem`s; each item is identified by its string resource key, such as `R.string.sb_text_channel_anchor_edit`. To change the menu, subclass `ChannelFragment`, filter or add items in `makeMessageContextMenu`, and handle your own items in `onMessageContextMenuItemClicked` (return `true` when you handled it). Install the subclass with `ChannelFragment.Builder(channelUrl).setCustomFragment(...)`, usually inside `FragmentProviders.channel`.

Expand Down
Loading
Loading