Revision as of 22:22, 9 October 2013 by kiran10182 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

From Nokia Developer 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 22:22.
59 page views in the last 30 days.