Note: The following getting started guide uses Sendbird UIKit, a set of rich, prebuilt UI components, which you can use to create a modern messenger experience in your app in under 10 minutes. Of course, you can also use the Sendbird Chat SDK with your own custom UI.
Start sending a message with Sendbird from scratch using Kotlin and the Sendbird UIKit. The client-side and server-side code builds a communication channel to send and receive a message.
To send your first message, you will need to achieve two milestones.
1. Create a Sendbird account and users in the Sendbird environment.
2. Import Sendbird UIKit dependencies and integrate the Sendbird UIKit SDK in your application.
This guide covers both steps in detail and is meant for developers of any level of proficiency so they can see how easy it is to send their first message in their application starting from scratch. Let’s get started!
1. Sign up for a free Sendbird account
2. Create an account using your email id or `Continue with Google`
3. Setup your Organization by entering `Organization name` and `Phone number`
4. Create your Sendbird application after choosing `Product type`, and entering your `Application Name`, `Region`
5. You will be directed to the main page of the Sendbird Dashboard to get started with implementing Sendbird Chat SDK, API in your product.
6. Once you’re in copy your unique `applicationID` from the Application section and paste it in your clipboard
1. Navigate to Users section in the left navigation of the dashboard
2. Click `Create user +` icon on the top right
3. Create a new user by filling out the following fields:
– `Profile URL` – Optional
– `Issue access token` – Optional
Create at least two users to begin with so you have users in your application that can chat with one another.
To build our project we will be using Android Studio as our IDE, and creating a fresh project. Or you can add to an existing project with little difference to what will be covered below.
1. Create a project
2. Install the UIKit using Gradle
1. The UIKit for Android is installed via Gradle. Add the following to the project level build.gradle file.
2. Then open your app level build.gradle file. For Java and Kotlin, add code blocks and dependencies as below and Sync to apply the changes.
1. Create a class named BaseApplication, and initialize a SendBirdUIKit instance by passing the SendBirdUIKitAdapter instance as an argument to a parameter in the SendBirdUIkit.init() method.
Note: *You can launch the UIKit from either a Fragment or an Activity, and you do not need to extend ChannelListActivity.*
1. Run the application on a emulator or a plugged in device.
2. Go ahead and create a channel as shown below.
3. Send your first message
Try typing a message and hit send. You should be able to successfully send your first message in the newly built chat in your application.
You are ready to send and receive messages with Sendbird.