I need to get event when user switches foreground (myapp)
application to background, example with taskswitcher.
What method should I implement for CCoeControl-type app?
CCoeAppUi::HandleForegroundEventL() is called by the system when an application switches to background or to foreground. Just overwrite it in your AppUi class. You might need to call the default implementation in your code.
Marko / Forum Nokia