addListener


Purpose

Adds a hardware button listener to the list of listeners.

Signature

HardwareButtons.addListener( callback )

Returns

This method does not return anything.

Parameter

Name Description Type Use
callback Passed to verify the status of a hardware button. undefined required

Callback structure

The HardwareButtons listener's callback can be structured as follows:

{
    onBackButtonPressed: function() {
        ...
        window.launchbox.HardwareButtons.fireDefaultBackButtonAction();
    }
}

Methods

The following table lists all callbacks supported by the listener.

Name Description Return type
onBackButtonPressed Indicates that the "back" hardware button has been pressed. undefined

Related topics

HardwareButtons
Legal notice | Copyright © 2015 and Confidential to Pegasystems Inc. All rights reserved. | Feedback
Advanced...