I had a problem launching my own menu button on Android through the Cordova 4.0.0 phonebook. I also implemented a back button and it works great. I cannot understand what is wrong here. This seems to be ok according to the cordova docs. This fails when running tests on the Samsung S4.
init : function () { document.addEventListener("deviceready", this.onDeviceReady, false); }, onDeviceReady : function() { // Register the event listener document.addEventListener('backbutton', this.onBackKeyDown, false); document.addEventListener('menubutton', this.onMenuKeyDown, false); }, onMenuKeyDown : function(event) { alert('menu phone home'); }
code>
And the init function is called after loading, and, as I mentioned, onBackKeyDown works. Any hints appreciated.
source share