Key Press After Applet is Closed | developer.brewmp.com Key Press After Applet is Closed | developer.brewmp.com

Developer

Key Press After Applet is Closed

Forums:

It seems that on some phones (the vx6100 and cdm-180 for instance), when I exit my applet by means of a key press (such as hitting the CLR key or hitting the OK key in a menu), the key press will be sent to the 'Get It Now' menu after my applet has closed.

This results in a network connection attempt when the OK key is used, because the default selection in the Get It Now menu is "Get It Now". If I press a the CLR key to exit, the applet will effectively return the user to the main screen (out of the Get It Now menu).

I always return TRUE on EVT_KEY, EVT_KEY_PRESS, and EVT_KEY_RELEASE, regardless of whether or not I actually do anything with the key. The ISHELL_CloseApplet function is called in the handler for an EVT_KEY_PRESS event.

Other applications on the same phones do not exhibit this behavior. Is there any way I can make sure the key press does not affect the Get It Now menu?

Any help would be greatly appreciated. Thanks.

-Chris

http://brewforums.qualcomm.com/showthread.php?t=3401
You need to close your application on EVT_KEY key event instead of EVT_KEY_PRESS. Otherwise the AVK_CLR EVT_KEY event is not handled by your application so it is passed along to the BREW app manager and closes that as well.
http://brewforums.qualcomm.com/showthread.php?t=6246
Similarly, if you can exit your application with AVK_SELECT (with an exit command that you press OK to accept, for example) you will need to change that too or you may get whatever is selected in the app manager started up.

http://brewforums.qualcomm.com/showthread.php?t=3401
You need to close your application on EVT_KEY key event instead of EVT_KEY_PRESS. Otherwise the AVK_CLR EVT_KEY event is not handled by your application so it is passed along to the BREW app manager and closes that as well.
http://brewforums.qualcomm.com/showthread.php?t=6246
Similarly, if you can exit your application with AVK_SELECT (with an exit command that you press OK to accept, for example) you will need to change that too or you may get whatever is selected in the app manager started up.

That fix seemed to have worked, at least on most of my phones (the razr vc3 still has troubles, but other apps on the same phone behave the same way).
Thanks for the help!

That fix seemed to have worked, at least on most of my phones (the razr vc3 still has troubles, but other apps on the same phone behave the same way).
Thanks for the help!