Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova blackberry convenience key

I want to reprogram my Blackberry convenience key using Cordova.

document.addEventListener("volumeupbutton", onVolumeUpKeyDown, false);

function onVolumeUpKeyDown() {
    // Handle the volume up button
}

I get the above code to handle the volume keys. But how can I handle blackberry convenience key in Cordova?

Any help will be appreciated

like image 752
Hello World Avatar asked Apr 20 '19 13:04

Hello World


1 Answers

I don't think there is one. Cordova documentation doesn't offer anything beyond standard key events. You can try to implement your own in Java, name it "conveniencebutton" and later listen to it. You can take a look here: - https://github.com/apache/cordova-android/blob/ce531545557e8da782d0640a8749199edc8dcf5f/framework/src/org/apache/cordova/CordovaWebViewImpl.java#L557-L600

like image 196
sumone Avatar answered Sep 30 '22 12:09

sumone