Hi guys
I want change the menu what shows when you press the power button key on the phone
I already know the API to alter the menu, but I need a handle to work
Thank you
Hi guys
I want change the menu what shows when you press the power button key on the phone
I already know the API to alter the menu, but I need a handle to work
Thank you
What API are you using and how ?
What excatly would you assume that should happen when you use the API, and what are you experiencing happining instead ?
I found this example in the symbian API help
I need a pointer CEikMenuPane to the menu show in the power button clickCode:void CMyappView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ) { if ( aResourceId == R_COMMON_MENU ) { CEikMenuPaneItem::SData menuFindNext; menuFindNext.iCommandId = EMyappFindNext; menuFindNext.iCascadeId = 0; menuFindNext.iFlags = 0; menuFindNext.iText = KMyappFindNext; aMenuPane->AddMenuItemL( menuFindNext ); } }
that would work in general menu handling insaide your own application, I would not think that it would be fired when the power key is pressed outside your own application contex.
or have you verified that this function gets called when the power key is pressed ?
No
This function is to add a item to a menu
When the user press the power button one menu appears
So I need a handle to this menu to use my function to add another item
I believe this menu is created when the system starts e exists while the power is on
So I want to add a item in this menu when my app starts.
Thx
You can track focus changes via implementing AppUi::HandleForegroundEventL. If you check it, you will see that the menu in question is provided by a completely different application. DynInitMenuPaneL in your application can not change it.
What it is excatly that you would want to do with it ?
Generally only way to 'modify' it what I could quickly think, would be to actually capture the power key, and then to bring your own 'menu' on top, i.e. actually replacing the menu, this would of course mean that you would need to implement all functionality included in teh menu by yourself, or use key-simulation (or by disabling the key capturing) to bring the menu back when needed.
All and all, would not recomend doign so, unless you are certain you know what you are doing there.
I want add some functionality to power menu, maybe to the shell menu too.
I don't want wanna need open a app to do some stuff.
Just hit power button, select option and done.
The replace option is OK, as long I can read the stock menu structure to replace it.
The problem with this option is sometimes the menu change, like when you have or not the energy save profile active.
OK
I will search a little more on this topic.
A mod can close the topic.
Thx for the help.