Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Keypad sound is lost when focus returns to the Symbian app

From Wiki
Jump to: navigation, search

Article Metadata
Platform(s): S60 1st Edition
S60 2nd Edition
S60 2nd Edition (initial release)
S60 1st Edition
Created: User:Technical writer 2 (04 May 2004)
Last edited: hamishwillee (14 Jun 2012)


Our application launches external applications, but sounds generated by the phone when the keypad is used are not heard when our application is re-entered through the Tasks list or when the launched application is closed. The launched applications include, for example, camera, video, messages, and agenda. To hear the keypad tones again, our application has to be closed and opened again.


According to the specifications, the CAknKeySoundSystem takes care of generating sounds. Its BringToForegorund() method tells the server that this client is now in the foreground, and that it's context stack should be used for processing sounds.
This is called automatically by CAknAppUi:
void CAknAppUi::HandleForegroundEventL(TBool aForeground)
if (iKeySounds && aForeground)


When you use the ways described in the Nokia Developer document Utilizing External Application Views to switch between application, make sure that you call the base class function:
in your overloaded implementation of HandleForegroundEventL()  - otherwise the keypad sounds will be lost.
For example,
void CMyViewAppUi::HandleForegroundEventL(TBool aForeground)
... // Application-specific code on Focus change

This page was last modified on 14 June 2012, at 04:53.
18 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.