Friday, July 01, 2005

ICamera Preview Mode: Recieve SMS or In coming call

Got my app back from NSTL stating this bug:
" If the application has the camera in the preview mode and an incoming voice call is received, then the handset’s ringer is distorted. "


For some reason when the ICamera is in the preview mode, it shuts off the ringer on Moto V265. Havent actually figured out why this is happening ... dont know how I can figure this out either. The native camera application on the handset does exhibit the same behavior. My application displays the notification on the screen but just shuts of the ringer.
This is something I will have to look at in the future and try it out with the other handsets but for now a temporary fix ( thanks to Ilho) has done the job. When I start the camera I register for a notification:


ISHELL_RegisterNotify(pMe->pIShell, AEECLSID_MYAPPLET_ID,AEECLSID_TAPI, NMASK_TAPI_STATUS NMASK_TAPI_SMS_TEXT);


and when I stop the camera internally, I unregister for the notification:

ISHELL_RegisterNotify(pMe->pIShell, AEECLSID_MYAPPLET_ID, AEECLSID_TAPI, 0);


In my main applet handle event function I have dumped in some code to shutt off the camera as soon as you get an incoming SMS or Phone call.


case EVT_NOTIFY: {

AEENotify * ns = (AEENotify *)dwParam;

if(NMASK_TAPI_STATUS == ns->dwMask NMASK_TAPI_SMS_TEXT == ns->dwMask){

//Shut off the camera and show a pause screeen

// If user accepts the incoming call or reads the message then the applet

// will recieve a EVT_SUSPEND event. Else have the Select key ready to

// activate the camera on the pause screen.

}
return TRUE;
}


Note: Set the privelege level in the MIF to have access to TAPI.

1 comment:

  1. Yep .. its confirmed on the VX8000 tooo..... when the camera is active in the preview mode .. you dont hear the ring tone.

    ReplyDelete