OEM dialog while MakeVoiceCall | developer.brewmp.com OEM dialog while MakeVoiceCall | developer.brewmp.com

Developer

OEM dialog while MakeVoiceCall

Forums:

Hi. I rested against a wall. My app makes phone do several sequential calls. When call is invoked on the scrn appears OEM dialog asking yes or no of making a call. App receives at first EVT_DIALOG_START and EVT_DIALOG_END after chosing an answer. And phone either makes a call or NOT. When down Yes app reseives EVT_APP_SUSPEND and so on. But if say No, nothing is happens. I mean wParam of dialog is allways NULL. And how can we determine whether call will be invoked or not?
As for me I make a check on the presence of EVT_APP_SUSPEND after some delay. But may be that is why i have unstable work with crashes.
Is there ather mean to define answer on call dialog?

And by the way, how much is it rightful to invoke some functions between EVT_APP_SUSPEND and EVT_APP_RESUME?

And by the way, how much is it rightful to invoke some functions between EVT_APP_SUSPEND and EVT_APP_RESUME?

Check this FAQ..............
Responding No to ITAPI_MakeVoiceCall privacy alert hangs application
________________________________________________________
Version 1.0.1 has a bug in the removal of preferences: preferences set using ISHELL_SetPrefs() are not removed when the application is removed. This has been fixed in BREW Version 1.1.
The recommended workaround 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:
1. Added a boolean 'madeVoiceCall' in the Applet structure
2. 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;

3. 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;
4. 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;
___________________________
Sreehari
BREW Developer

Check this FAQ..............
Responding No to ITAPI_MakeVoiceCall privacy alert hangs application
________________________________________________________
Version 1.0.1 has a bug in the removal of preferences: preferences set using ISHELL_SetPrefs() are not removed when the application is removed. This has been fixed in BREW Version 1.1.
The recommended workaround 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:
1. Added a boolean 'madeVoiceCall' in the Applet structure
2. 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;

3. 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;
4. 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;
___________________________
Sreehari
BREW Developer

Thank you very much. Although double press on select is a specific measure, but additional key press is simple and useful way,i guess.

Thank you very much. Although double press on select is a specific measure, but additional key press is simple and useful way,i guess.

P.S. I develope on Brew V.2.1.3. But it is helpful to observe such docs of v.3.1, as API Reference and helpers. Where can i get this specs without installing 3.x SDK.

P.S. I develope on Brew V.2.1.3. But it is helpful to observe such docs of v.3.1, as API Reference and helpers. Where can i get this specs without installing 3.x SDK.