mirror of
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background
synced 2024-11-14 19:44:53 +00:00
Allow app to override backbutton behaviour
This commit is contained in:
parent
d012080d2b
commit
5bd6b1f0d8
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user