Answers

Question and Answer:

  Home  Brew

⟩ When making a voice call using ITAPI_MakeVoiceCall, responding No to the Privacy Alert hangs the application. What is the workaround?

This is a bug in BREW SDK version 1.0.1, and will be fixed in an upcoming release.

The recommended workaround for BREW SDK Version 1.0.1 is for the user to press 'No' twice (i.e. press Select Key twice). When the Privacy Alert Yes/No dialog is displayed, all key events up until the first Select key press go to the Dialog. After the first Select key (for the dialog), subsequent key events go to the application.

Steps are outlined below:

Added a boolean 'madeVoiceCall' in the Applet structure

If ITAPI_MakeVoiceCall() returns Success, set madeVoiceCall to TRUE

retValue = ITAPI_MakeVoiceCall(pMe->p_tapi, PHONE_NUM,

AEECLSID_SAMPLEAPP);

ITAPI_Release(pMe->p_tapi);

if(retValue == SUCCESS) {

pMe->madeTapiCall = TRUE;

}

Handle EVT_KEY in the app handler function. If the Select key was pressed and madeVoiceCall is TRUE, the user has selected No in response to the Privacy Alert. Set madeVoiceCall = FALSE and redraw screen.

case EVT_KEY:

if (wParam == AVK_SELECT && pMe->madeTapiCall ==

TRUE) {

// Redraw screen

pMe->madeTapiCall = FALSE;

}

return TRUE;

If the user selected 'Yes' to the Privacy Alert, the application would have been suspended. When resumed, the madeVoiceCall flag must be cleared.

case EVT_APP_RESUME:

if(pMe->madeTapiCall == TRUE) {

pMe->madeTapiCall = FALSE;

}

… … …

… … …

return TRUE;

 155 views

More Questions for you: