Android Getting Started
ConnectyCube helps you implement real-time chat, video chat, push notifications and user authorization to any app with ease - no server side implementation required. You can concentrate fully on your mobile app development. Our Android SDK provides you with many helpful methods to build the chat and video chat from the client side.
This page provides a quick overview of the SDK’s functionalities and logic, then let you go through the easy steps of implementing ConnectyCube in your own app.
ConnectyCube Android SDK can be used with the following languages and platforms:
- Android (phone/tablet) Java
- Android (phone/tablet) Kotlin
Minimum Android version supported is Android 4.3.
Create ConnectyCube app
Register a FREE ConnectyCube account at https://connectycube.com/signup/, then create your 1st app and obtain an app credentials. These credentials will be used to identify your app.
All users within the same ConnectyCube app can communicate by chat or video chat with each other, across all platforms - iOS, Android, Web, etc.
When building a new app
If you are just starting your app and developing it from scratch, we recommend to use our Code Samples projects.
These code samples are ready-to-go apps with an appropriate functionality and simple enough that even novice developers will be able to understand them.
When integrating SDK into existing app
If you already have an app, do the following for integration.
Connect SDK
To get the ConnectyCube SDK project running you will need Android Studio and Maven installed.
The repository https://github.com/ConnectyCube/connectycube-android-sdk-releases contains binary distributions of ConnectyCube Android SDK and an instruction how to connect SDK to your project. Check it out.
Include reference to sdk repository in your build.gradle file at the app level (top level):
repositories { maven { url "https://github.com/ConnectyCube/connectycube-android-sdk-releases/raw/master/" } }
Then include dependencies to particular sdk-modules in build.gradle project file:
dependencies { implementation "com.connectycube.sdk:connectycube-android:2.0.0-beta05"}
dependencies { implementation "com.connectycube:connectycube-android-sdk-chat:1.8.1" implementation "com.connectycube:connectycube-android-sdk-videochat:1.8.1" implementation "com.connectycube:connectycube-android-sdk-storage:1.8.1" implementation "com.connectycube:connectycube-android-sdk-pushnotifications:1.8.1"}
Initialize
Initialize framework with your ConnectyCube application credentials:
ConnectyCubeAndroid.init(APP_ID, AUTH_KEY, AUTH_SECRET, context = applicationContext)
const val APP_ID = "21"const val AUTH_KEY = "hhf87hfushuiwef"const val AUTH_SECRET = "jjsdf898hfsdfk"const val ACCOUNT_KEY = "sdfhdfy2329763buiyi"//ConnectycubeSettings.getInstance().init(applicationContext, APP_ID, AUTH_KEY, AUTH_SECRET)ConnectycubeSettings.getInstance().accountKey = ACCOUNT_KEY
static final String APP_ID = "21";static final String AUTH_KEY = "hhf87hfushuiwef";static final String AUTH_SECRET = "jjsdf898hfsdfk";static final String ACCOUNT_KEY = "sdfhdfy2329763buiyi";//ConnectycubeSettings.getInstance().init(getApplicationContext(), APP_ID, AUTH_KEY, AUTH_SECRET);ConnectycubeSettings.getInstance().setAccountKey(ACCOUNT_KEY);
You can access your application credentials in ConnectyCube Dashboard.
Configuration
An additional set of configs can be configured via ConnectycubeSettings
class:
val connectycubeConfig: ConnectycubeConfig = ConnectycubeConfig("https://your_api_endpoint.com", "your_chat_endpoint")ConnectyCubeAndroid.init(applicationId, authKey, authSecret, connectycubeConfig, context = applicationContext)
ConnectycubeSettings.getInstance().logLevel = LogLevel.NOTHING
ConnectycubeSettings.getInstance().setLogLevel(LogLevel.NOTHING);
Now integrate messaging & calling capabilities
Follow the API guides on how to integrate chat and calling features into your app:
SDK Changelog
The complete SDK changelog is available on ConnectyCube Android GitHub page