Help Center> Meeting> Client SDK Reference> Android SDK> API Reference> Notification Reference> Customizing Notification Events of Automatic Incoming Call Processing
Updated on 2023-03-23 GMT+08:00

Customizing Notification Events of Automatic Incoming Call Processing

Notification Description

You can customize the incoming call event processing API in OpenSDKConfig.

You can customize the automatic processing mode for answering a call when you receive an incoming P2P call or meeting invitation. By default, the answering screen is displayed.

Application Scenarios

Answering a call directly when receiving a meeting invitation: answerTypeOnConfIncoming. HWMIncomingAnswerType.HWM_INCOMING_AUTO_ANSWER is returned.

Rejecting a call when receiving a meeting invitation: answerTypeOnConfIncoming. HWMIncomingAnswerType.HWM_IMCOMING_AUTO_DECLINE is returned.

P2P calls and other scenarios

Precautions

sdkConfig takes effect only when this configuration is passed during SDK initialization.

Sample Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    sdkConfig.setInComingHandle(new IIncomingHandle() {
        @Override
        public HWMIncomingAnswerType answerTypeOnCallIncoming() {
            // Customize the incoming call processing mode for P2P calls.
            return HWMIncomingAnswerType.HWM_IMCOMING_NORMAL;
        }

        @Override
        public HWMIncomingAnswerType answerTypeOnConfIncoming() {
            // Customize the incoming call processing mode for meeting invitations.
            return HWMIncomingAnswerType.HWM_IMCOMING_NORMAL;
        }
    });

Reference Returned Values

1
2
3
4
5
public enum HWMIncomingAnswerType {
    HWM_IMCOMING_NORMAL(0, "HWM_IMCOMING_NORMAL"),    // The default processing mode is used.
    HWM_IMCOMING_AUTO_DECLINE(1, "HWM_IMCOMING_AUTO_DECLINE"), // The call is automatically rejected.
    HWM_INCOMING_AUTO_ANSWER(2, "HWM_INCOMING_AUTO_ANSWER");  // The call is automatically answered.
}