hyphenate_SDK3.0  3.6.0
hyphenatejavaIMSDK
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
com.hyphenate.chat.EMCallManager Class Reference
Collaboration diagram for com.hyphenate.chat.EMCallManager:
Collaboration graph
[legend]

Classes

class  CallStateUnion
 
class  EMACallListenerDelegate
 
interface  EMCallPushProvider
 
interface  EMCameraDataProcessor
 

Public Member Functions

String getIncomingCallBroadcastAction ()
 
void setCameraDataProcessor (EMCameraDataProcessor processor)
 
void setPushProvider (EMCallPushProvider provider)
 
CallState getCallState ()
 
EMVideoCallHelper getVideoCallHelper ()
 
void makeVideoCall (String username) throws EMServiceNotReadyException
 
void makeVideoCall (String username, String ext) throws EMServiceNotReadyException
 
void makeVideoCall (String username, String ext, boolean recordOnServer, boolean mergeStream) throws EMServiceNotReadyException
 
void makeVoiceCall (String username) throws EMServiceNotReadyException
 
void makeVoiceCall (String username, String ext) throws EMServiceNotReadyException
 
void makeVoiceCall (String username, String ext, boolean recordOnServer, boolean mergeStream) throws EMServiceNotReadyException
 
void addCallStateChangeListener (EMCallStateChangeListener listener)
 
void removeCallStateChangeListener (EMCallStateChangeListener listener)
 
synchronized void setSurfaceView (EMCallSurfaceView localSurface, EMCallSurfaceView oppositeSurface)
 
void answerCall () throws EMNoActiveCallException
 
void rejectCall () throws EMNoActiveCallException
 
void endCall () throws EMNoActiveCallException
 
boolean isDirectCall ()
 
void pauseVoiceTransfer () throws HyphenateException
 
void resumeVoiceTransfer () throws HyphenateException
 
void pauseVideoTransfer () throws HyphenateException
 
void resumeVideoTransfer () throws HyphenateException
 
void setCameraFacing (int facing) throws HyphenateException
 
synchronized void switchCamera ()
 
int getCameraFacing ()
 
EMCallOptions getCallOptions ()
 
EMCallSession getCurrentCallSession ()
 
void inputExternalVideoData (byte[] data, int width, int height, int rotation)
 
void inputExternalVideoData (byte[] data, RtcConnection.FORMAT format, int width, int height, int rotation)
 

Static Public Attributes

static final String IncomingCallAction = ".action.incomingcall"
 

Protected Member Functions

 EMCallManager (EMClient client, EMACallManager manager)
 
void changeState (final CallState state, final CallError callError)
 

Member Function Documentation

void com.hyphenate.chat.EMCallManager.addCallStateChangeListener ( EMCallStateChangeListener  listener)

register call state change listener

Parameters
listener
void com.hyphenate.chat.EMCallManager.answerCall ( ) throws EMNoActiveCallException

answer phone call

Exceptions
EMNoActiveCallException
void com.hyphenate.chat.EMCallManager.endCall ( ) throws EMNoActiveCallException

hang up phone call

Exceptions
EMNoActiveCallException
int com.hyphenate.chat.EMCallManager.getCameraFacing ( )

get the camera currently using

Returns
camera int value
void com.hyphenate.chat.EMCallManager.inputExternalVideoData ( byte[]  data,
int  width,
int  height,
int  rotation 
)

input video data from external data source, only support NV21 format.

Parameters
data
width
height
rotationUse inputExternalVideoData(byte[], RtcConnection.FORMAT, int, int, int) for instead.
void com.hyphenate.chat.EMCallManager.inputExternalVideoData ( byte[]  data,
RtcConnection.FORMAT  format,
int  width,
int  height,
int  rotation 
)

input video data from external data source

Parameters
data
width
height
rotation
boolean com.hyphenate.chat.EMCallManager.isDirectCall ( )

check if it's a P2P call with direct connection

Returns
void com.hyphenate.chat.EMCallManager.makeVideoCall ( String  username) throws EMServiceNotReadyException

make video call, before make video call, call setSurfaceView in Activity.onCreate firstly.

Parameters
usernamecallee's user id
Exceptions
EMServiceNotReadyException
void com.hyphenate.chat.EMCallManager.makeVideoCall ( String  username,
String  ext 
) throws EMServiceNotReadyException

make video call, before make video call, call setSurfaceView in Activity.onCreate first

Parameters
usernamecallee's user id.
extextension string, user can transfer self defined content
Exceptions
EMServiceNotReadyException
void com.hyphenate.chat.EMCallManager.makeVideoCall ( String  username,
String  ext,
boolean  recordOnServer,
boolean  mergeStream 
) throws EMServiceNotReadyException

make video call, before make video call, call setSurfaceView in Activity.onCreate first

Parameters
usernamecallee's user id.
extextension string, user can transfer self defined content
recordOnServerif record on server
mergeStreamif merge stream when record on server
Exceptions
EMServiceNotReadyException
void com.hyphenate.chat.EMCallManager.makeVoiceCall ( String  username) throws EMServiceNotReadyException

make video call, before make video call, call setSurfaceView in Activity.onCreate first

Parameters
usernamecallee's user id.
Exceptions
EMServiceNotReadyExceptionif IM is not connected, or previous call doesn't disconnected, will throw EMServiceNotReadyException
void com.hyphenate.chat.EMCallManager.makeVoiceCall ( String  username,
String  ext 
) throws EMServiceNotReadyException

make video call, before make video call, call setSurfaceView in Activity.onCreate first

Parameters
usernamecallee's user id.
extextension string, user can transfer self defined content
Exceptions
EMServiceNotReadyExceptionif IM is not connected, or previous call doesn't disconnected, will throw EMServiceNotReadyException
void com.hyphenate.chat.EMCallManager.makeVoiceCall ( String  username,
String  ext,
boolean  recordOnServer,
boolean  mergeStream 
) throws EMServiceNotReadyException

make video call, before make video call, call setSurfaceView in Activity.onCreate first

Parameters
usernamecallee's user id.
extextension string, user can transfer self defined content
recordOnServerif record on server
mergeStreamif merge the streams if record on server
Exceptions
EMServiceNotReadyExceptionif IM is not connected, or previous call doesn't disconnected, will throw EMServiceNotReadyException
void com.hyphenate.chat.EMCallManager.pauseVideoTransfer ( ) throws HyphenateException

pause real time video data transfer

void com.hyphenate.chat.EMCallManager.pauseVoiceTransfer ( ) throws HyphenateException

pause real time voice data transfer

void com.hyphenate.chat.EMCallManager.rejectCall ( ) throws EMNoActiveCallException

decline phone call

Exceptions
EMNoActiveCallException
void com.hyphenate.chat.EMCallManager.removeCallStateChangeListener ( EMCallStateChangeListener  listener)

remove call state change listener

Parameters
listener
void com.hyphenate.chat.EMCallManager.resumeVideoTransfer ( ) throws HyphenateException

resume real time video data transfer

void com.hyphenate.chat.EMCallManager.resumeVoiceTransfer ( ) throws HyphenateException

resume real time voice data transfer

void com.hyphenate.chat.EMCallManager.setCameraDataProcessor ( EMCameraDataProcessor  processor)

Not implemented. This method will be removed in future versions.

Parameters
processor
void com.hyphenate.chat.EMCallManager.setCameraFacing ( int  facing) throws HyphenateException

start camera capture

Parameters
facingselect CameraInfo.CAMERA_FACING_BACK or CameraInfo.CAMERA_FACING_FRONT
Exceptions
HyphenateExceptionif cameraIndex not in CameraInfo.CAMERA_FACING_BACK, 或者CameraInfo.CAMERA_FACING_FRONT, got the exception.
synchronized void com.hyphenate.chat.EMCallManager.setSurfaceView ( EMCallSurfaceView  localSurface,
EMCallSurfaceView  oppositeSurface 
)

Must be called when Activity.onCreate, otherwise cannot get surface size accurately

Parameters
localSurfacedefault local SurfaceView
oppositeSurfacedefault remote SurfaceView

The documentation for this class was generated from the following file: