AlexisCaffa
AlexisCaffa

Reputation: 349

How to fire a cordova event without overriding?

Example:

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

function onVolumeUpKeyDown() {

    // This handler override the default «Volume Up» action
}

Specifically, my problem is on android.

I need do another action when the volume up button is pressed, and also increase the volume...

Upvotes: 3

Views: 173

Answers (1)

user3255670
user3255670

Reputation:

@AlexisCaffa,

you have two (2) paths

  1. use a plugin. There are two available, only one works with Android.
  2. use a different button.

My notes on Phonegap events indicate that unless you use a plugin, the volume button is only available for the blackberry.

Best of Luck

Upvotes: 2

Related Questions