public abstract class Voice extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Voice.RegistrationChannel |
| Constructor and Description |
|---|
Voice() |
| Modifier and Type | Method and Description |
|---|---|
static Call |
call(android.content.Context context,
String accessToken,
Map<String,String> twiMLParams,
Call.Listener listener)
Creates a new OutgoingCall.
|
static LogLevel |
getLogLevel()
Returns the logging level for messages logged by the Voice SDK.
|
static LogLevel |
getModuleLogLevel(LogModule module)
Returns the logging level for messages logged by the specified LogModule.
|
static String |
getRegion()
Returns the region set for the Voice SDK.
|
static String |
getVersion()
Returns the version of the Voice SDK.
|
static void |
handleMessage(android.content.Context context,
android.os.Bundle data,
MessageListener listener)
Handle messages from GCM
|
static void |
handleMessage(android.content.Context context,
Map<String,String> data,
MessageListener listener)
Handle messages from FCM
|
static void |
register(android.content.Context context,
String accessToken,
String fcmToken,
RegistrationListener listener)
Deprecated.
use
register(Context, String, RegistrationChannel, String, RegistrationListener)
specifying FCM as the RegistrationChannel. |
static void |
register(android.content.Context context,
String accessToken,
Voice.RegistrationChannel registrationChannel,
String registrationToken,
RegistrationListener listener)
Register for incoming call messages
|
static void |
setLogLevel(LogLevel level)
Sets the logging level for messages logged by the Voice SDK.
|
static void |
setModuleLogLevel(LogModule module,
LogLevel level)
Sets the logging level for messages logged by a specific module.
|
static void |
setRegion(String region)
Sets the region (Twilio data center) for the SDK.
|
static void |
unregister(android.content.Context context,
String accessToken,
String fcmToken,
UnregistrationListener listener)
Deprecated.
use
unregister(Context, String, RegistrationChannel, String, UnregistrationListener)
specifying FCM as the RegistrationChannel. |
static void |
unregister(android.content.Context context,
String accessToken,
Voice.RegistrationChannel registrationChannel,
String registrationToken,
UnregistrationListener listener)
Unregisters with FCM token from receiving further incoming call messages.
|
public static void register(android.content.Context context,
String accessToken,
Voice.RegistrationChannel registrationChannel,
String registrationToken,
RegistrationListener listener)
context - The application context of your Android application.accessToken - An access token.registrationChannel - An enumeration of registration channels.registrationToken - A GCM or FCM registration token.listener - A listener that receives registration request status.@Deprecated public static void register(android.content.Context context, String accessToken, String fcmToken, RegistrationListener listener)
register(Context, String, RegistrationChannel, String, RegistrationListener)
specifying FCM as the RegistrationChannel.context - The application context of your Android application.accessToken - An access token.fcmToken - A FCM token.listener - A listener that receives registration request status.public static void unregister(android.content.Context context,
String accessToken,
Voice.RegistrationChannel registrationChannel,
String registrationToken,
UnregistrationListener listener)
context - The application context of your Android applicationaccessToken - An access token.registrationChannel - An enumeration of registration channels.registrationToken - An FCM or GCM device token.listener - A listener that receives unregistration request status.@Deprecated public static void unregister(android.content.Context context, String accessToken, String fcmToken, UnregistrationListener listener)
unregister(Context, String, RegistrationChannel, String, UnregistrationListener)
specifying FCM as the RegistrationChannel.context - The application context of your Android applicationaccessToken - An access token.fcmToken - A FCM token.listener - A listener that receives unregistration request status.public static Call call(android.content.Context context, String accessToken, Map<String,String> twiMLParams, Call.Listener listener)
A SecurityException will be thrown if RECORD_AUDIO is not granted
context - The application context of your Android application.accessToken - An access token.twiMLParams - An optional Map of parameters that are passed to your TwiML Application.listener - A listener that receives call status.Call objectpublic static void handleMessage(android.content.Context context,
Map<String,String> data,
MessageListener listener)
public static void handleMessage(android.content.Context context,
android.os.Bundle data,
MessageListener listener)
public static String getVersion()
public static LogLevel getLogLevel()
public static LogLevel getModuleLogLevel(LogModule module)
public static void setLogLevel(LogLevel level)
level - The logging levelpublic static void setModuleLogLevel(LogModule module, LogLevel level)
module - The module for this log level.level - The logging level.public static void setRegion(String region)
region - The region.public static String getRegion()