diff --git a/www/background-mode.js b/www/background-mode.js index 81ec97e..063705d 100644 --- a/www/background-mode.js +++ b/www/background-mode.js @@ -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. *