Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

on pressing end key i need to prompt a message for user weather he really wants to exit which im not able to do,control is returning to freeapp and appl is getting exit, i need help in this regard please...

regards
manju

In your apps handleevent, add a case for AVK_END, add your code and return TRUE . If you are returning FALSE, BREW will handle the End key and it will stop the applets.

In your apps handleevent, add a case for AVK_END, add your code and return TRUE . If you are returning FALSE, BREW will handle the End key and it will stop the applets.

i tried it by returning true but control itself is not returning to AVK_END
on pressing end key its returning to EVT_APP_STOP..

i tried it by returning true but control itself is not returning to AVK_END
on pressing end key its returning to EVT_APP_STOP..

mk.manju wrote:i tried it by returning true but control itself is not returning to AVK_END
on pressing end key its returning to EVT_APP_STOP..
Check this thread
http://brewforums.qualcomm.com/showthread.php?t=15182
also note this point given there from max..
If your app doesn't exit on End key, you will fail TBT.
Typically this is done through checking the Phone flag in the MIF
and giving your app system privs. Apps with system privs are also failed
immediately in TBT. Even if your app is set up properly, the OEM may
still close all apps in response to the End key.
After checking the phone flag in MIF (Which also requires to set System privilege),
return TRUE to AVK_END in app main handler will prevent app from stopping..
case EVT_KEY:
{
switch(wParam)
{
case AVK_END:
{
GETTIMEMS();
return TRUE;
}
break;
default:
break;
}

return(FALSE);

mk.manju wrote:i tried it by returning true but control itself is not returning to AVK_END
on pressing end key its returning to EVT_APP_STOP..
Check this thread
http://brewforums.qualcomm.com/showthread.php?t=15182
also note this point given there from max..
If your app doesn't exit on End key, you will fail TBT.
Typically this is done through checking the Phone flag in the MIF
and giving your app system privs. Apps with system privs are also failed
immediately in TBT. Even if your app is set up properly, the OEM may
still close all apps in response to the End key.
After checking the phone flag in MIF (Which also requires to set System privilege),
return TRUE to AVK_END in app main handler will prevent app from stopping..
case EVT_KEY:
{
switch(wParam)
{
case AVK_END:
{
GETTIMEMS();
return TRUE;
}
break;
default:
break;
}

return(FALSE);

its working im able to display message but on pressing softkey2
da application should close so wat shuld i do close da application as it closes when we press endkey

its working im able to display message but on pressing softkey2
da application should close so wat shuld i do close da application as it closes when we press endkey

mk.manju wrote:its working im able to display message but on pressing softkey2
da application should close so wat shuld i do close da application as it closes when we press endkey
Check BREW documentations- BREWAPIReference.chm
use ISHELL_CloseApplet(pIShell, FALSE); to close ur application on pressing softkey2.
For 2nd parameter
If FALSE, only the currently running applet is closed. If TRUE, all active applications are
closed. PL_SYSTEM is required to call this function with bReturnToIdle set to
TRUE.

mk.manju wrote:its working im able to display message but on pressing softkey2
da application should close so wat shuld i do close da application as it closes when we press endkey
Check BREW documentations- BREWAPIReference.chm
use ISHELL_CloseApplet(pIShell, FALSE); to close ur application on pressing softkey2.
For 2nd parameter
If FALSE, only the currently running applet is closed. If TRUE, all active applications are
closed. PL_SYSTEM is required to call this function with bReturnToIdle set to
TRUE.

its working...
regards
manju

its working...
regards
manju