Audio Volume Key Event On Symbian

From Qt Wiki
Revision as of 14:00, 14 January 2015 by Maintenance script (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

English Български

Getting Audio Volume Key Event on Symbian Devices

In QML on Symbian devices, audio volume key events are not delivered via Keys.onVolumeDownPressed, Keys.onVolumeUpPressed, or Keys.onPressed. An appropriate solution is wrapping around S60 Remote Control API [] by inheriting MRemConCoreApiTargetObserver []. This is an example code how to do it when building QML/C++ app. Making QML plugin should not be too far from this.

Create a new QML element to deliver the audio volume key event. The S60 Remote Control API actually can get other media key events too. Refer the link above for more detail.



In the C++ code, register it into the declarative engine.

Then, you need to add some lines in your .pro file to build.

In QML, just listen to the signals like this


In Qt SDK 1.1 (Windows, Beta and RC) this available only for Symbian^3. But simply copy all
will solved compilation problem.