Allow app to override backbutton behaviour

This commit is contained in:
Sebastián Katzer 2017-01-03 21:56:57 +01:00
parent d012080d2b
commit 5bd6b1f0d8

View File

@ -110,6 +110,16 @@ exports.moveToBackground = function () {
}
};
/**
* Override the back button on Android to go to background
* instead of closing the app.
*
* @return [ Void ]
*/
exports.overrideBackButton = function () {
document.addEventListener('backbutton', this.moveToBackground, false);
};
/**
* If the mode is enabled or disabled.
*