Methods Summary |
---|
public void | accept(int callType, com.android.ims.ImsStreamMediaProfile profile)Accepts an incoming call or session update.
if (mClosed) {
return;
}
try {
miSession.accept(callType, profile);
} catch (RemoteException e) {
}
|
public synchronized void | close()Closes this object. This object is not usable after being closed.
if (mClosed) {
return;
}
try {
miSession.close();
mClosed = true;
} catch (RemoteException e) {
}
|
public void | extendToConference(java.lang.String[] participants)Extends this call to the conference call with the specified recipients.
if (mClosed) {
return;
}
try {
miSession.extendToConference(participants);
} catch (RemoteException e) {
}
|
public java.lang.String | getCallId()Gets the call ID of the session.
if (mClosed) {
return null;
}
try {
return miSession.getCallId();
} catch (RemoteException e) {
return null;
}
|
public com.android.ims.ImsCallProfile | getCallProfile()Gets the call profile that this session is associated with
if (mClosed) {
return null;
}
try {
return miSession.getCallProfile();
} catch (RemoteException e) {
return null;
}
|
public com.android.ims.ImsCallProfile | getLocalCallProfile()Gets the local call profile that this session is associated with
if (mClosed) {
return null;
}
try {
return miSession.getLocalCallProfile();
} catch (RemoteException e) {
return null;
}
|
public java.lang.String | getProperty(java.lang.String name)Gets the value associated with the specified property of this session.
if (mClosed) {
return null;
}
try {
return miSession.getProperty(name);
} catch (RemoteException e) {
return null;
}
|
public com.android.ims.ImsCallProfile | getRemoteCallProfile()Gets the remote call profile that this session is associated with
if (mClosed) {
return null;
}
try {
return miSession.getRemoteCallProfile();
} catch (RemoteException e) {
return null;
}
|
public IImsCallSession | getSession()Gets the native IMS call session.
return miSession;
|
public int | getState()Gets the session state.
The value returned must be one of the states in {@link State}.
if (mClosed) {
return State.INVALID;
}
try {
return miSession.getState();
} catch (RemoteException e) {
return State.INVALID;
}
|
public IImsVideoCallProvider | getVideoCallProvider()Gets the video call provider for the session.
if (mClosed) {
return null;
}
try {
return miSession.getVideoCallProvider();
} catch (RemoteException e) {
return null;
}
|
public void | hold(com.android.ims.ImsStreamMediaProfile profile)Puts a call on hold. When it succeeds, {@link Listener#callSessionHeld} is called.
if (mClosed) {
return;
}
try {
miSession.hold(profile);
} catch (RemoteException e) {
}
|
public void | inviteParticipants(java.lang.String[] participants)Requests the conference server to invite an additional participants to the conference.
if (mClosed) {
return;
}
try {
miSession.inviteParticipants(participants);
} catch (RemoteException e) {
}
|
public boolean | isAlive()Determines if the {@link ImsCallSession} is currently alive (e.g. not in a terminated or
closed state).
if (mClosed) {
return false;
}
int state = getState();
switch (state) {
case State.IDLE:
case State.INITIATED:
case State.NEGOTIATING:
case State.ESTABLISHING:
case State.ESTABLISHED:
case State.RENEGOTIATING:
case State.REESTABLISHING:
return true;
default:
return false;
}
|
public boolean | isInCall()Checks if the session is in call.
if (mClosed) {
return false;
}
try {
return miSession.isInCall();
} catch (RemoteException e) {
return false;
}
|
public boolean | isMultiparty()Determines if the session is multiparty.
if (mClosed) {
return false;
}
try {
return miSession.isMultiparty();
} catch (RemoteException e) {
return false;
}
|
public void | merge()Merges the active & hold call. When it succeeds,
{@link Listener#callSessionMergeStarted} is called.
if (mClosed) {
return;
}
try {
miSession.merge();
} catch (RemoteException e) {
}
|
public void | reject(int reason)Rejects an incoming call or session update.
if (mClosed) {
return;
}
try {
miSession.reject(reason);
} catch (RemoteException e) {
}
|
public void | removeParticipants(java.lang.String[] participants)Requests the conference server to remove the specified participants from the conference.
if (mClosed) {
return;
}
try {
miSession.removeParticipants(participants);
} catch (RemoteException e) {
}
|
public void | resume(com.android.ims.ImsStreamMediaProfile profile)Continues a call that's on hold. When it succeeds,
{@link Listener#callSessionResumed} is called.
if (mClosed) {
return;
}
try {
miSession.resume(profile);
} catch (RemoteException e) {
}
|
public void | sendDtmf(char c, android.os.Message result)Sends a DTMF code. According to RFC 2833,
event 0 ~ 9 maps to decimal value 0 ~ 9, '*' to 10, '#' to 11, event 'A' ~ 'D' to 12 ~ 15,
and event flash to 16. Currently, event flash is not supported.
if (mClosed) {
return;
}
try {
miSession.sendDtmf(c, result);
} catch (RemoteException e) {
}
|
public void | sendUssd(java.lang.String ussdMessage)Sends an USSD message.
if (mClosed) {
return;
}
try {
miSession.sendUssd(ussdMessage);
} catch (RemoteException e) {
}
|
public void | setListener(com.android.ims.internal.ImsCallSession$Listener listener)Sets the listener to listen to the session events. A {@link ImsCallSession}
can only hold one listener at a time. Subsequent calls to this method
override the previous listener.
mListener = listener;
|
public void | setMute(boolean muted)Mutes or unmutes the mic for the active call.
if (mClosed) {
return;
}
try {
miSession.setMute(muted);
} catch (RemoteException e) {
}
|
public void | start(java.lang.String callee, com.android.ims.ImsCallProfile profile)Initiates an IMS call with the specified target and call profile.
The session listener is called back upon defined session events.
The method is only valid to call when the session state is in
{@link ImsCallSession#State#IDLE}.
if (mClosed) {
return;
}
try {
miSession.start(callee, profile);
} catch (RemoteException e) {
}
|
public void | start(java.lang.String[] participants, com.android.ims.ImsCallProfile profile)Initiates an IMS conference call with the specified target and call profile.
The session listener is called back upon defined session events.
The method is only valid to call when the session state is in
{@link ImsCallSession#State#IDLE}.
if (mClosed) {
return;
}
try {
miSession.startConference(participants, profile);
} catch (RemoteException e) {
}
|
public void | startDtmf(char c)Starts a DTMF code. According to RFC 2833,
event 0 ~ 9 maps to decimal value 0 ~ 9, '*' to 10, '#' to 11, event 'A' ~ 'D' to 12 ~ 15,
and event flash to 16. Currently, event flash is not supported.
if (mClosed) {
return;
}
try {
miSession.startDtmf(c);
} catch (RemoteException e) {
}
|
public void | stopDtmf()Stops a DTMF code.
if (mClosed) {
return;
}
try {
miSession.stopDtmf();
} catch (RemoteException e) {
}
|
public void | terminate(int reason)Terminates a call.
if (mClosed) {
return;
}
try {
miSession.terminate(reason);
} catch (RemoteException e) {
}
|
public java.lang.String | toString()Provides a string representation of the {@link ImsCallSession}. Primarily intended for
use in log statements.
StringBuilder sb = new StringBuilder();
sb.append("[ImsCallSession objId:");
sb.append(System.identityHashCode(this));
sb.append(" state:");
sb.append(State.toString(getState()));
sb.append(" callId:");
sb.append(getCallId());
sb.append("]");
return sb.toString();
|
public void | update(int callType, com.android.ims.ImsStreamMediaProfile profile)Updates the current call's properties (ex. call mode change: video upgrade / downgrade).
if (mClosed) {
return;
}
try {
miSession.update(callType, profile);
} catch (RemoteException e) {
}
|