removeVirtualPage Method

This method will help control a device's hardware "back" button.

intel.xdk.device.removeVirtualPage();

Description:

This method will remove the interception of a single press of the device's hardware "back" button. For example, the back button on the Android device platform. This method is not available on all platforms.

Platforms:

Example:



function stopCapturingBackButton() {
    //stop grabbing the Android hardware back button
    intel.xdk.device.removeVirtualPage(); 
}

document.addEventListener("intel.xdk.device.ready",function() {

    //start grabbing the Android hardware back button
    intel.xdk.device.addVirtualPage(); 
    
},false);

        
document.addEventListener("intel.xdk.device.hardware.back", function() {
    
    //continue to grab the back button
    intel.xdk.device.addVirtualPage(); 
    
    document.getElementsByTagName("body")[0].innerHTML += "Hardware back button pressed
";
    
}, false);    


For more complete information about compiler optimizations, see our Optimization Notice.