Issue
What I want to do is call one of my functions whenever the user presses the volume up or the volume down buttons on the phone. What I tried so far is using the cordova events, but without any success (nothing happens when I touch the buttons)
In app.component.ts
:
this.platform.ready().then(() => {
document.addEventListener("volumeupbutton", this.myFunc, false);
});
myFunc() {
console.log("it's working");
}
Solution
You can try with cordova-plugin-volume-buttons plugin
Answered By - Dhananjay Chaudhari
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.