Updated on 2024-07-30 GMT+08:00

Setting the Call Answer Mode

Function

This API is used to set the call answer mode, including original pop-up, automatic rejection, and automatic answer.

Function Prototype

setAnswerType(inComingAnswerTypeInfo: InComingAnswerTypeInfo, onSetAnswerTypeResult?: (ret: SDKERR, reason: string) => void): voidsetAnswerType(inComingAnswerTypeInfo: InComingAnswerTypeInfo, onSetAnswerTypeResult?: (ret: SDKERR, reason: string) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
inComingAnswerTypeInfo Yes InComingAnswerTypeInfo Incoming call answer information.
onSetAnswerTypeResult Yes (ret: SDKERR, reason: string) => void Callback of setting the incoming call answer mode.
Table 2 InComingAnswerTypeInfo
Parameter Mandatory Type Description
type Yes InComingAnswerType Incoming call answer type.
Table 3 Enumerated values of InComingAnswerType
Enumeration Name Enumerated Value Description
HWM_INCOMING_ANSWER_NORMAL 0 (Default value) Displays the incoming call answer screen.
HWM_INCOMING_ANSWER_DECLINE 1 Rejects an incoming call.
HWM_INCOMING_ANSWER_ANSWER 2 Answers an incoming call.

Return Values

void

Callback Method Parameters

(ret: SDKERR, reason: string) => void

Table 4 Input parameter description
Parameter Type Description
ret For details about SDKERR, see Error Code Reference. Error code.
reason string Error description.