Skip to main content

Notes on Running Twilio Video Android Sample

note

This article has been translated by Gemini.

f🆔shoheikawano:20200903224648p:plain

Running Twilio Video Android Sample
#

Rough notes on things I got stuck on when running the Twilio Video Android sample. This is from a few months ago, but I’m writing it down just in case.

Mainly referred to the following link. Below are rough notes.

github.com

Install dependencies via brew to be able to execute twilio commands:

brew tap twilio/brew && brew install twilio
brew upgrade twilio

Execute login:

twilio login

SID and such:

? The Account SID for your Twilio Account or Subaccount: ? Your Twilio Auth Token for your Twilio Account or Subaccount: [hidden] ? Shorthand identifier for your profile:

Created API Key XXX and stored the secret in your keychain. See: https://www.twilio.com/console/runtime/api-keys/XXX
twilio-cli configuration saved to "XXX"
twilio plugins:install @twilio-labs/plugin-rtc

warning @twilio-labs/plugin-rtc > @twilio-labs/serverless-api > @types/form-data@2.5.0: This is a stub types definition. form-data provides its own type definitions, so you do not need this installed. warning “@twilio-labs/plugin-rtc > @oclif/command@1.5.19” has unmet peer dependency “@oclif/plugin-help@^2”. Installing plugin @twilio-labs/plugin-rtc… installed v0.1.4

twilio rtc:apps:video:deploy --authentication passcode

When I ran the above command, it failed with the following error:

Something went wrong GotError [HTTPError]: Response code 409 (CONFLICT)

Investigating the cause led to an issue like this:

github.com

It said to troubleshoot because sometimes the CLI plugin gets into a weird state. ↓

github.com

twilio plugins:update # to update the rtc plugin to the latest version.
twilio rtc:apps:video:delete # to delete any existing video apps.

After running the two above, I ran this again:

twilio rtc:apps:video:deploy --authentication passcode

This time it succeeded and I successfully obtained the passcode.

deploying app... done
Passcode: XXX
Expires: Sun Apr 19 2020 00:29:11 GMT+0900

Looking at the description here, the passcode is valid for one week. You can regenerate a new passcode with the following command:

The passcode will expire after one week. To generate a new passcode, run twilio rtc:apps:video:deploy –authentication passcode –override.

Build the app with the Community flavor that any developer can build.

./gradlew assembleCommunityDebug

When trying to install on a Pixel 3 XL with Android OS Pie, I got the following error:

adb: failed to install app/build/outputs/apk/community/debug/app-community-debug.apk: 
Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]

To set up ABI, refer to the following and rebuild:

github.com

adb install app/build/outputs/apk/community/debug/app-community-arm64-v8a-debug.apk

Installation complete.