This repository will help you learn how to use Agora chat SDK to implement a simple chat android application, like whatsapp or wechat.
With this sample app, you can:
- Login chat server
- Start a chat
- Manage conversation list
- Add contacts
- Join group chats
- Join chat rooms
- Add your contacts to your blacklist
- Send various types of messages, Such as: text, expression, picture, voice, file and so on
- Logout
- Make sure you have made the preparations mentioned in the Agora Chat SDK quickstart.
- Prepare the development environment:
- Java Development Kit (JDK)
- Android Studio 3.6 or later
Follow these steps to run the sample project:\
git clone git@github.com:AgoraIO-Usecase/AgoraChat-android.git
Set your appkey applied from Agora Developer Console before calling ChatClient#init().
ChatOptions options = new ChatOptions();
// Set your appkey
options.setAppKey("Your appkey");
...
//initialization
ChatClient.getInstance().init(applicationContext, options);
For details, see the prerequisites in Agora Chat SDK Guide.
- Set the JDK version to 11 or higher.
- Add the following fields in local.properties:
AGORA_CHAT_APPKEY={Your AppKey} // Replace {Your AppKey} with your actual AppKey AGORA_APPID=”{Your AppId}” // Make sure to include quotation marks, replace {Your AppId} with your actual AppId
- You can find full API document at Document Center
- You can file bugs about this demo at issue
The MIT License (MIT).