Audio Volume Key Event On Symbian: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
(No difference)

Revision as of 14:00, 14 January 2015

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 [wiki.forum.nokia.com] by inheriting MRemConCoreApiTargetObserver [library.forum.nokia.com]. 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.

MediakeyCaptureItem.h

MediakeyCaptureItem.cpp

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

Troubleshooting

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

Categories: