hyphenate_SDK3.0  3.1.4
hyphenatejavaIMSDK
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
com.hyphenate.chat.EMCallManager Class Reference

Classes

class  EMACallListenerDelegate
 
interface  EMCameraDataProcessor
 
class  EMVideoCallHelper
 

Public Member Functions

String getIncomingCallBroadcastAction ()
 
 EMCallManager (EMClient client, EMACallManager manager)
 
void setCameraDataProcessor (EMCameraDataProcessor processor)
 
EMVideoCallHelper getVideoCallHelper ()
 
CallState getCallState ()
 
void makeVideoCall (String username) throws EMServiceNotReadyException
 
void makeVoiceCall (String username) throws EMServiceNotReadyException
 
void addCallStateChangeListener (EMCallStateChangeListener listener)
 
void removeCallStateChangeListener (EMCallStateChangeListener listener)
 
void setSurfaceView (EMLocalSurfaceView localSurface, EMOppositeSurfaceView oppositeSurface)
 
void answerCall () throws EMNoActiveCallException
 
void rejectCall () throws EMNoActiveCallException
 
void endCall () throws EMNoActiveCallException
 
boolean isDirectCall ()
 
int getVoiceInputLevel ()
 
void pauseVoiceTransfer ()
 
void resumeVoiceTransfer ()
 
void pauseVideoTransfer ()
 
void resumeVideoTransfer ()
 
boolean streamStarted ()
 
void setCameraFacing (int facing) throws HyphenateException
 
synchronized void switchCamera ()
 
int getCameraFacing ()
 

Static Public Attributes

static final String IncomingCallAction = "com.hyphenate.action.incomingcall"
 

Protected Member Functions

void changeState (final CallState callState, final CallError callError)
 

Member Function Documentation

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

set listener to monitor call state changes

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

answer call

Exceptions
EMNoActiveCallExceptionif there is no active calling on going, throw EMNoActiveCallException
void com.hyphenate.chat.EMCallManager.endCall ( ) throws EMNoActiveCallException

end the call

Exceptions
EMNoActiveCallExceptionif there is no active calling on going, throw EMNoActiveCallException
int com.hyphenate.chat.EMCallManager.getCameraFacing ( )

get the current camera facing

Returns
int com.hyphenate.chat.EMCallManager.getVoiceInputLevel ( )

get the input level(range from 0 to 9)

Returns
boolean com.hyphenate.chat.EMCallManager.isDirectCall ( )

check if that's a P2P call

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
HyphenateException
void com.hyphenate.chat.EMCallManager.makeVoiceCall ( String  username) throws EMServiceNotReadyException

make voice call

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.pauseVideoTransfer ( )

pause the video stream transfer

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

pause the voice transfer

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

reject the call

Exceptions
EMNoActiveCallExceptionif there is no active calling on going, throw EMNoActiveCallException
void com.hyphenate.chat.EMCallManager.removeCallStateChangeListener ( EMCallStateChangeListener  listener)

remove call state listener

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

resume video stream transfer

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

resume the voice transfer

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

start camera capture

Parameters
facingcan be CameraInfo.CAMERA_FACING_BACK, CameraInfo.CAMERA_FACING_FRONT : if cameraIndex not in CameraInfo.CAMERA_FACING_BACK, or CameraInfo.CAMERA_FACING_FRONT, got the exception.
void com.hyphenate.chat.EMCallManager.setSurfaceView ( EMLocalSurfaceView  localSurface,
EMOppositeSurfaceView  oppositeSurface 
)

Must be called in Activity.onCreate, otherwise can not get surface size accurately.

Parameters
localSurface
oppositeSurface
boolean com.hyphenate.chat.EMCallManager.streamStarted ( )

check if the stream is already started

Returns

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