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.

Use dedicated volume keys in N9 to adjust game or media volume

From Wiki
Jump to: navigation, search

This article explains how to have dedicated volume keys to adjust media volume in N9

Article Metadata
Tested with
Devices(s): N9
Keywords: Volume keys
Created: teemup (14 May 2012)
Last edited: kiran10182 (09 Oct 2013)


By default in N9 when you press the volumekeys the ringing tone volume is adjusted. For Games and other media applications you might wish to enable support for "media volume" adjustments with volume keys instead.

This article explains how you can specify your application to require this behavior.


First, verify what is the target name of your application. Open the .pro file and see the "TARGET = " value.

For example:

TARGET = myqtgame

Create a folder under your project, named "n9volumekeys" (the folder name does not matter - as long as you use the same path in the latter part). Create a file named your target name, and use the extension ".conf". For this example the filename would be ""n9volumekeys/myqtgame.conf" In the file, include following lines:

[classify gaming]

Again, replace myqtgame with the exact target name you are using.

Finally, find the correct position in .pro file to add the .conf file to be installed in the device.

unix:!symbian {
maemo5 {
else {
# Classify the application as a game to support volume keys on Harmattan.
gameclassify.files += n9volumekeys/$${TARGET}.conf
gameclassify.path = /usr/share/policy/etc/syspart.conf.d

Build the application and test on device. You should see that pressing the volume keys on device while your application is running, is now changing the media volume.

For more thorough examples on how to do game audio, please see Qt GameEnabler

This page was last modified on 9 October 2013, at 19:22.
30 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.