接口 EaseCallKitListener


  • public interface EaseCallKitListener
    the callkit events listener。 the user can implementation this to listen the events occured in the video or audio .
    • 方法详细资料

      • onInviteUsers

        void onInviteUsers​(EaseCallType callType,
                           java.lang.String[] existMembers,
                           org.json.JSONObject ext)
        Invite new users to join a audio or video call during a multi-party chat
        参数:
        callType - call type
        existMembers - Users who already exist in the channel, excluding the inviter self
        ext - the ext information ,type of JSONObject
      • onEndCallWithReason

        void onEndCallWithReason​(EaseCallType callType,
                                 java.lang.String channelName,
                                 EaseCallEndReason reason,
                                 long callTime)
        Ending a Call
        参数:
        callType - call type
        channelName - channel name
        reason - Reason for Ending a Call
        callTime - total call time
      • onReceivedCall

        void onReceivedCall​(EaseCallType callType,
                            java.lang.String fromUserId,
                            org.json.JSONObject ext)
        receive a invite call
        参数:
        callType - call type
        fromUserId - inviter's userId(AgoraChat userId)
        ext - the ext information of invite ,type of JSONObject
      • onGenerateRTCToken

        default void onGenerateRTCToken​(java.lang.String userId,
                                        java.lang.String channelName,
                                        EaseCallKitTokenCallback callback)
        Get the RTC token Users can configure whether to enable RTC token verification in EaseCallKitConfig.setEnableRTCToken(boolean) (Boolean)}. If RTC token verification is not enabled, the method will not be called back. On the other hand. In this method, the user should first obtain the RTC token and agora uid from the app server, and then callback the RTC token and agora uid to the callback object passed in the parameter, so that the callkit can get the RTC token and agora uid to join in the calling room. if get RTC token success:EaseCallKitTokenCallback.onSetToken(java.lang.String, int) of the callback object is called failure: the EaseCallKitTokenCallback.onGetTokenError(int, java.lang.String) method of the callback object is called, which returns the error code and error message. *
        参数:
        userId - userId(AgoraChat userId)
        channelName - channel name
        callback - a callback object
      • onCallError

        void onCallError​(EaseCallError type,
                         int errorCode,
                         java.lang.String description)
        Call error callback
        参数:
        type - call error type ,see EaseCallError
        errorCode - errorCode ,see EaseCallProcessError
        description - the error des
      • onInViteCallMessageSent

        void onInViteCallMessageSent()
        Callback when a user sends a call invitation message
      • onRemoteUserJoinChannel

        void onRemoteUserJoinChannel​(java.lang.String channelName,
                                     java.lang.String userName,
                                     int uid,
                                     EaseCallGetUserAccountCallback callback)
        Callback when the remote user joins the channel In this case, the user should query the AgoraChat userId corresponding to the uid in the app server through the passed parameter, encapsulate it into a EaseUserAccount object, and then callback to the callback object passed through the parameter. Success is to call its {@link EaseCallGetUserAccountCallback# onUserAccount (IO. Agora. Chat. Callkit. Beans. EaseUserAccount)} to EaseUserAccount object is passed. Failure is to call its {@link EaseCallGetUserAccountCallback# onSetUserAccountError (int, Java. Lang. String)} transfer error code and error description .
        参数:
        channelName - channel name
        userName - userId(AgoraChat userId)
        uid - agora uid
        callback - a callback object
      • onUserInfoUpdate

        default void onUserInfoUpdate​(java.lang.String userName)
        Notifies the user to update the user information,Fired when a UI change occurs within the Callkit or some change event is received in a channel。 Users can customize user nicknames, images and so on here. Note that the update process is placed in the synchronous method to achieve timely page refresh.Users do not need to achieve this requirement.
        参数:
        userName - userId(AgoraChat userId)