Skip to content

jefflinwood/twilio-client-quickstart-android

 
 

Repository files navigation

twilio-client-quickstart-android

Twilio Client for Android Quickstart

This application should give you a ready-made starting point for writing your own voice-enabled apps with Twilio Client. Before we begin, you need to collect the credentials to run the Twilio Client Quickstart web app.

Config Value Description
Account SID Your primary Twilio account identifier - find this in the console here.
Auth Token Used to authenticate - just like the above, you'll find this here.
TwiML App SID The TwiML application with a voice URL configured to access your server running this app - create one in the console here. Also, you will need to configure the Voice "REQUEST URL" on the TwiML app once you've got your server up and running.
Twilio Phone # A Twilio phone number in E.164 format - you can get one here

Choose a download package for your server-side language of choice. If you're primarily a mobile app developer and don't have a strong preference, Node.js or Ruby will probably get you up and running the fastest.

##Setting up the web app Follow the instructions in the README for each starter application to configure and run it on your machine, using the four values we created above:

Your application should now be running locally.

Host Your Server

Once you've got your server up and running, you will need to host it somewhere Twilio can access it. You can publish your app to a web hosting provider, or you can run it locally and use ngrok to create a tunnel to your development machine with a publicly accessible URL. See the README above for the specific ngrok instructions for your preferred platform.

Configure Your TwiML App

Now, configure the Voice "REQUEST URL" on your TwiML App to hit the voice URL on your server. Again, see the README above for platform-specific instructions.

Setting Up The Android App

In the ClientActivity.java file, on this line,

private static final String TOKEN_SERVICE_URL = "TOKEN_SERVICE_URL";

Replace the URL with the address of your server, followed by /token, for instance, https://asdf456.ngrok.io/token

Go ahead and run your application, either in the Android Emulator, or on your device, and you should be up and running! You can make Twilio Client connections to other users of your quickstart server (find your identity at the bottom of the app), or make outgoing phone calls from the app.

License

MIT

About

A simple Android application demonstrating the use of Twilio Client. Relies on: https://github.com/twilio/mobile-quickstart

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%