public abstract class Twilio
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Twilio.InitListener
Interface for the listener object to pass to
initialize(Context, InitListener) . |
Modifier and Type | Method and Description |
---|---|
static Device |
createDevice(java.lang.String inCapabilityToken,
DeviceListener inListener)
Create and initialize a new Device object.
|
static java.lang.String |
getVersion()
Returns the version of the Twilio SDK.
|
static void |
initialize(android.content.Context inContext,
Twilio.InitListener inListener)
Initialize the Twilio Client SDK.
|
static boolean |
isInitialized()
Determines if the Twilio Client SDK has been initialized or not.
|
static java.util.List<Device> |
listDevices()
Retrieves a list of all active
Device s. |
static void |
setLogLevel(int level)
Sets the logging level for messages logged by the Twilio SDK.
|
static void |
setMetrics(boolean enable)
Toggle the call metrics publishing feature of the Twilio SDK.
|
static void |
shutdown()
Shuts down the Twilio Client SDK.
|
public static void initialize(android.content.Context inContext, Twilio.InitListener inListener)
inContext
- The Application Context from your Android app. Make sure you
don't pass an Activity Context. You can retrieve the Application Context
by calling getApplicationContext() on your Activity. Cannot be null.inListener
- A Twilio.InitListener
that will notify you when the
service is ready. Cannot be null.java.lang.IllegalArgumentException
public static void shutdown()
public static boolean isInitialized()
listDevices()
public static Device createDevice(java.lang.String inCapabilityToken, DeviceListener inListener)
inCapabilityToken
- A signed JSON Web Token that defines the features available to the Device.
These may be created using the Twilio Helper Libraries included with the SDK or available at
www.twilio.com. The capabilities are used to begin listening
for incoming connections and provide the default parameters used for establishing outgoing connections.
Please visit http://www.twilio.com/docs/client/capability-tokens
for more information.inListener
- The optional listener object which will receive events from a Device object.public static java.util.List<Device> listDevices()
Device
s.List
of Device
objectspublic static void setLogLevel(int level)
Log
class.
To disable all Twilio SDK logging, set this to
Log.ASSERT
. The default is
Log.ERROR
.public static java.lang.String getVersion()
public static void setMetrics(boolean enable)