10-11-2013 11:22 AM - edited 10-11-2013 11:24 AM
I am trying to detect when a Media Key (e.g. Volume up) is pressed and released.
I can receive the longPress signal from MediaKeyWatcher from MediaKey::VolumeUp after the key is pressed for a while. However, I don't receive any signal when the key is released.
I have tried both setNotification(MediaKeyNotification::Thresho
I am testing on Z10STL100-2/10.2.0.1793 and BlackBerry Native SDK 10.2.
Is it a bug? Is there any workaround? Thank you.
10-11-2013 11:45 AM
Clicked should cause the signal to be emitted when the hardware key is released, if that's not happening, it sounds like a bug. Can you provide some sample code?
10-11-2013 08:23 PM
My sample code is just like:
MediaKeyWatcher* keyWatcher = new MediaKeyWatcher(MediaKey::VolumeUp);
QObject::connect(keyWatcher, SIGNAL(longPress(bb::multimedia::MediaKey::Type)), this, SLOT(onLongPress(bb::multimedia::MediaKey::Type)))
void ApplicationUI:nLongPress(bb::multimedia::MediaKey::Type type)
qWarning() << "onLongPress: " << type << endl;
I found onLongPress is triggered after pressing for a threshold, no matter if I use MediaKeyNotification::Clicked or not.
If it's confirmed a bug, is there another API to detect the MediaKey? At QT level? Thanks.