This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sb.connect(userId, "...").then((user, error) => { | |
sb.GroupChannel.getChannel('test2').then((channel, error) => { | |
// console.log(channel) | |
messageCollection = channel.createMessageCollection() | |
.setStartingPoint(Date.now()) | |
.setLimit(30) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Flag to check if the chat is connected or not | |
connected = false; | |
// String with the error (in case of any, when creating a group channel) | |
startConversationResult: string; | |
// List of this signed user's group channels | |
conversations: Array<SendBird.GroupChannel> | null; | |
// String with the error (in case of any, when trying to list our group channels) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p> | |
<button (click)="connect()">Connect to chat</button> | |
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable, Query } from '@angular/core'; | |
import SendBird from 'sendbird'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".UIKitActivity"> | |
<androidx.appcompat.widget.LinearLayoutCompat | |
android:id="@+id/mainLayout" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.uikitinsidefragment; | |
import androidx.appcompat.app.AppCompatActivity; | |
import androidx.fragment.app.FragmentManager; | |
import android.os.Bundle; | |
import com.sendbird.android.GroupChannel; | |
import com.sendbird.android.GroupChannelListQuery; | |
import com.sendbird.uikit.fragments.ChannelListFragment; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<Button | |
android:id="@+id/butCallUIKit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.uikitinsidefragment; | |
import androidx.appcompat.app.AppCompatActivity; | |
import androidx.fragment.app.FragmentManager; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.View; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.uikitinsidefragment; | |
import android.app.Application; | |
import com.sendbird.uikit.SendBirdUIKit; | |
import com.sendbird.uikit.adapter.SendBirdUIKitAdapter; | |
import com.sendbird.uikit.interfaces.UserInfo; | |
import com.sendbird.uikit.log.Logger; | |
public class BaseApplication extends Application { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This script migrates all messages and users | |
* from a Sendbird supergroup channel to a group channel | |
* by creating a new group channel and deleting the old supergroup channel. | |
* | |
* Note: make sure you have chat history enabled for newly joined members | |
* Enable it by selecting an App from the Dashboard and toggle the checkbox under | |
* Settings > Chat > Group Channels > Chat history | |
* | |
* To use this script, you need to change APP_ID and API_TOKEN below |
NewerOlder