Allow app from being excluded from recent list

This commit is contained in:
Sebastián Katzer
2017-01-29 11:16:53 +01:00
parent c2fedef6d2
commit 18fc64fddb
4 changed files with 53 additions and 0 deletions

View File

@@ -158,6 +158,17 @@ exports.moveToForeground = function () {
}
};
/**
* Exclude the app from the recent tasks list (Android only).
*
* @return [ Void ]
*/
exports.excludeFromTaskList = function () {
if (this._isAndroid) {
cordova.exec(null, null, 'BackgroundMode', 'tasklist', []);
}
};
/**
* Override the back button on Android to go to background
* instead of closing the app.