public class CallInvite extends Object implements android.os.Parcelable
Initial state of CallInvite is CallInvite.State.PENDING
.
CallInvite transitions to CallInvite.State.ACCEPTED
state when accept() is called.
CallInvite transitions to CallInvite.State.REJECTED
state when reject() is called.
CallInvite transitions to CallInvite.State.CANCELED
state when CallInvite.messageType is "twilio.voice.cancel".
Modifier and Type | Class and Description |
---|---|
static class |
CallInvite.State |
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator |
CREATOR |
Modifier and Type | Method and Description |
---|---|
Call |
accept(android.content.Context context,
AcceptOptions acceptOptions,
Call.Listener listener)
Accepts the Call with ConnectOptions.
|
Call |
accept(android.content.Context context,
Call.Listener listener)
Accepts the Call with ConnectOptions.
|
int |
describeContents() |
boolean |
equals(Object o) |
String |
getCallSid()
Returns the CallSid.
|
String |
getFrom()
Returns the caller information.
|
CallInvite.State |
getState()
Returns the current state of the call invite.
|
String |
getTo()
Returns the callee information.
|
void |
reject(android.content.Context context)
Rejects the Call.
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public String getFrom()
public String getTo()
public String getCallSid()
public CallInvite.State getState()
CallInvite is in CallInvite.State.PENDING
state when it is created.
CallInvite transitions to CallInvite.State.ACCEPTED
state when accepted.
CallInvite transitions to CallInvite.State.REJECTED
state when rejected.
CallInvite transitions to CallInvite.State.CANCELED
state when cancelled.
public Call accept(android.content.Context context, AcceptOptions acceptOptions, Call.Listener listener)
A SecurityException
will be thrown if RECORD_AUDIO is not granted.
context
- The application context of your Android application.acceptOptions
- A set of options that allow you to configure your Call
.listener
- A listener that receives call status.CallInvite
is in CallInvite.State.REJECTED
or
CallInvite.State.CANCELED
state else will return a Call
object.public Call accept(android.content.Context context, Call.Listener listener)
A SecurityException
will be thrown if RECORD_AUDIO is not granted.
context
- The application context of your Android application.listener
- A listener that receives call status.CallInvite
is in CallInvite.State.REJECTED
or
CallInvite.State.CANCELED
state else will return a Call
object.public void reject(android.content.Context context)
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
3.0.0-preview1