The new version of the Chat Demo Application is available in twilio-chat-demo-kotlin. It is an example of better app architecture and demonstrates best practices in implementing Twilio-based Chat.
For the Java version you can look here.
This demo app SDK version:
Welcome to the Chat Demo application. This application demonstrates a basic chat client with the ability to create and join channels, invite other members into the channels and exchange messages.
What you'll minimally need to get started:
Generate google-services.json file and place it under chat-demo-android/
.
ACCESS_TOKEN_SERVICE_URL
Set the value of ACCESS_TOKEN_SERVICE_URL
in gradle.properties
file to point to a valid Access-Token server.
Create that file if it doesn't exist with the following contents:
ACCESS_TOKEN_SERVICE_URL=http://example.com/get-token/
NOTE: no need for quotes around the URL, they will be added automatically.
You can also pass this parameter to gradle during build without need to create a properties file, as follows:
./gradlew assembleDebug -PACCESS_TOKEN_SERVICE_URL=http://example.com/get-token/
If you want to see crashes reported to crashlytics:
In order to see native crashes symbolicated upload symbols into the Firebase console:
./gradlew chat-demo-android:assembleBUILD_VARIANT
./gradlew chat-demo-android:uploadCrashlyticsSymbolFileBUILD_VARIANT
for example to upload symbols for debug
build type run:
./gradlew chat-demo-android:assembleDebug
./gradlew chat-demo-android:uploadCrashlyticsSymbolFileDebug
Read more about Android NDK crash reports.
chat-demo-android
application and navigate to Menu -> Options -> Simulate crash
in order to check that crashes coming into Firebase console.Run ./gradlew assembleDebug
to fetch Twilio SDK files and build application.
You can import this project into Android Studio and then build as you would ordinarily. The token server setup is still important.
Build in debug configuration, this will enable verbose logging.
MIT