Code Monkey home page Code Monkey logo

sendbird-chat-sample-android's Introduction

Sendbird Chat sample for Android

Overview

This repository provides feature-level Chat samples with Kotlin to demonstrate how to use the SendbirdΒ Chat SDK.

πŸ”’ Security tip

When a new Sendbird application is created in the dashboard the default security settings are set permissive to simplify running samples and implementing your first code.

Before launching make sure to review the security tab under βš™οΈ Settings -> Security, and set Access token permission to Read Only or Disabled so that unauthenticated users can not login as someone else. And review the Access Control lists. Most apps will want to disable "Allow retrieving user list" as that could expose usage numbers and other information.

Requirements

Android Studio 2.0+

Running the app

Open this project in Android Studio and select 'run configurations' to view a dropdown of feature-level Chat samples to choose from.

Once a sample is chosen, create a device and run the app on an Android device or Android emulator.

Language

  • Kotlin

Version

  • Android SDK
    • compileSdk: 32
    • minSdk: 26
    • targetSdk: 32
  • Gradle Version
    • gradle: 7.2
    • android gradle plugin: 4.2.0

Project structure

.
β”œβ”€β”€ commonmodule
β”‚   β”œβ”€β”€ ui
β”‚   β”‚   β”œβ”€β”€ CustomViews
β”‚   β”‚   └── base
β”‚   β”‚        β”œβ”€β”€ BaseApplication
β”‚   β”‚        β”œβ”€β”€ BaseActivity
β”‚   β”‚        └── BaseFragment
β”‚   └── utils
β”‚       β”œβ”€β”€ Utils
β”‚       └── Extension
β”œβ”€β”€ groupchannel-basic
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-typingindicator
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-readnessage
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-unreadmessages
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-onlinemembers
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-membersandoperators
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-banned-and-muted-users
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-groupchannel-add-remove-operators
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-mention-members
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-report-user-message-channel
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-freeze-unfreeze
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-mute-user
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-admin-message
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-ban-unban-user
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-mark-message-read
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-push-notifications
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ groupchannel-update-message-operator
β”‚   β”œβ”€β”€ groupchannel
β”‚   β”œβ”€β”€ main
β”‚   └── user
β”œβ”€β”€ openchannel-basic
β”‚   β”œβ”€β”€ openchannel
β”‚   └── main
β”œβ”€β”€ openchannel-user-online
β”‚   β”œβ”€β”€ openchannel
β”‚   └── main
β”œβ”€β”€ openchannel-update-message
β”‚   β”œβ”€β”€ openchannel
β”‚   └── main
β”œβ”€β”€ openchannel-delete-message
β”‚   β”œβ”€β”€ openchannel
β”‚   └── main
β”œβ”€β”€ openchannel-copy-message
β”‚   β”œβ”€β”€ openchannel
β”‚   └── main
β”œβ”€β”€ openchannel-mention-user
β”‚   β”œβ”€β”€ openchannel
β”‚   └── main
β”œβ”€β”€ openchannel-report-message-user-channel
β”‚   β”œβ”€β”€ openchannel
β”‚   └── main
β”œβ”€β”€ openchannel-admin-message
β”‚   β”œβ”€β”€ openchannel
β”‚   └── main
└── openchannel-feature-a
...

  • ui
    • Created for frequently used views.
    • Created activities commonly used such as Sign-Up, Splash, and UserInfo.
  • utils
    • Commonly used functions in Basic, Feature App

BasicSample

  • groupchannel-basic
  • openchannel-basic

FeatureSample

  • groupchannel-typingindicator
  • groupchannel-unreadmessages
  • groupchannel-readmessage
  • groupchannel-onlinemembers
  • groupchannel-membersandoperators
  • groupchannel-banned-and-muted-users
  • groupchannel-user-online
  • groupchannel-mention-members
  • openchannel-user-online
  • openchannel-delete-message
  • openchannel-update-message
  • openchannel-copy-message ...

Considerations in real world app

  • In this sample repo users are connecting to sendbird using a user ID (Sendbird Dashboard --> Security --> Read & Write). Read & Write is not secure and will create a new user automatically from the SDK if none exists. In production be sure to change the Sendbird Dashboard security settings to Deny login, and authenticate users with a Sendbird generated Session Token.

sendbird-chat-sample-android's People

Contributors

mihaimoiseanu avatar chrischabot avatar elliot-choic avatar james-a-rob avatar octa-george avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.