How to process AVK_END event? | developer.brewmp.com How to process AVK_END event? | developer.brewmp.com

Developer

How to process AVK_END event?

Forums:

Hi,
My app closed when the END key pressed. I would like my app prompt "Exit App?" when the key pressed, and then close app if the user confirm to close the app. Is anybody could give some advices? Thanks ahead.

wapdiannet wrote:Hi,
My app closed when the END key pressed. I would like my app prompt "Exit App?" when the key pressed, and then close app if the user confirm to close the app. Is anybody could give some advices? Thanks ahead.
You need to handle the EVT_APP_STOP in the main handle.
Brew sends the above event whenever the user presses the END key.

wapdiannet wrote:Hi,
My app closed when the END key pressed. I would like my app prompt "Exit App?" when the key pressed, and then close app if the user confirm to close the app. Is anybody could give some advices? Thanks ahead.
You need to handle the EVT_APP_STOP in the main handle.
Brew sends the above event whenever the user presses the END key.

Hi akshay1384,
U are correct, but how to stop Brew OS kill my app? I show the message when handling the EVT_APP_STOP event, but my app is still closed by OS no matter the return value is "TRUE" or "FALSE". Should I do something else to stop OS close my app? Thanks.

Hi akshay1384,
U are correct, but how to stop Brew OS kill my app? I show the message when handling the EVT_APP_STOP event, but my app is still closed by OS no matter the return value is "TRUE" or "FALSE". Should I do something else to stop OS close my app? Thanks.

Hi,
You can hook all the key events in some other Application and for AVK_END, you could send a user-defined event to your Application, wherein you can show the Exit Prompt and close your Application accordingly.

Hi,
You can hook all the key events in some other Application and for AVK_END, you could send a user-defined event to your Application, wherein you can show the Exit Prompt and close your Application accordingly.

Hi wrangler_brew,
Thanks, I will try it. By the way, is there any way to handle this just for app itself? Thanks!

Hi wrangler_brew,
Thanks, I will try it. By the way, is there any way to handle this just for app itself? Thanks!

Hi wrangler_brew,
I found that it needs system privilege level, and application developer can't set this privilege level. :(

Hi wrangler_brew,
I found that it needs system privilege level, and application developer can't set this privilege level. :(

Hi,
You can set the system privileges (PL_SYSTEM) via the MIF, which is very much accessible to the BREW Application Developer. You can go to the Tab Privileges->Advanced Privileges and tick the All (System) option. For this you also need to have the AFLAG_PHONE set for your Application.

Hi,
You can set the system privileges (PL_SYSTEM) via the MIF, which is very much accessible to the BREW Application Developer. You can go to the Tab Privileges->Advanced Privileges and tick the All (System) option. For this you also need to have the AFLAG_PHONE set for your Application.

Hi wrangler_brew,
It really woks, but I worry that my app's test would not pass by BREW with system privilege setting. Thanks very much. :)

Hi wrangler_brew,
It really woks, but I worry that my app's test would not pass by BREW with system privilege setting. Thanks very much. :)