Skip to content

josethepm/sync-quickstart-android

 
 

Repository files navigation

Sync Android Quickstart Application Overview

Getting Started

Welcome to the Sync Demo application. This application demonstrates a basic Tic-Tac-Toe client with the ability to make moves by any number of players, by synchronising the game state across the clients.

What you'll minimally need to get started:

Building

Add google-services.json

Generate google-services.json file and place it under sync-quickstart-android/.

Wire in your Token Service

Set the value of ACCESS_TOKEN_SERVICE_URL in gradle.properties file to point to a valid Access-Token server. If you're using one of the quickstarts to provide tokens, you'll probably want to use ngrok to direct a publicly-accessible URL to your localhost service.

$ ngrok http localhost:4567

Your gradle.properties file should look something like this, borrowing from the output of the above.

ACCESS_TOKEN_SERVICE_URL=http://9349392.ngrok.io/token

You can also pass this address to gradle during the build.

./gradlew assembleDebug -PACCESS_TOKEN_SERVICE_URL=http://example.com/get-token/

Build

Run ./gradlew assembleDebug to fetch Twilio Sync SDK files and build application.

Android Studio

You can import this project into Android Studio and then build as you would ordinarily. The token server setup is still important.

Optionally setup Firebase Crashlytics

If you want to see crashes reported to crashlytics:

  1. Set up Crashlytics in the Firebase console

  2. In order to see native crashes symbolicated upload symbols into the Firebase console:

./gradlew sync-quickstart-android:assembleBUILD_VARIANT
./gradlew sync-quickstart-android:uploadCrashlyticsSymbolFileBUILD_VARIANT

for example to upload symbols for debug build type run:

./gradlew sync-quickstart-android:assembleDebug
./gradlew sync-quickstart-android:uploadCrashlyticsSymbolFileDebug

Select "Simulate crash" from the app menu to force an app crash.

Read more about Android NDK crash reports.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%