enable/disable event

This commit is contained in:
Sebastián Katzer
2017-01-15 14:19:48 +01:00
parent 6dabe3427d
commit 337e39b2db
2 changed files with 17 additions and 9 deletions

View File

@@ -101,35 +101,31 @@ public class BackgroundMode extends CordovaPlugin {
boolean update = args.getBoolean(1);
configure(settings, update);
return true;
}
if (action.equalsIgnoreCase("disableWebViewOptimizations")) {
disableWebViewOptimizations();
return true;
}
if (action.equalsIgnoreCase("background")) {
moveToBackground();
return true;
}
if (action.equalsIgnoreCase("foreground")) {
moveToForeground();
return true;
}
if (action.equalsIgnoreCase("enable")) {
enableMode();
return true;
}
if (action.equalsIgnoreCase("disable")) {
disableMode();
return true;
}
return false;
callback.success();
return true;
}
/**