From 269f2e39ac79d73db7beda2bd585c412200dc4c5 Mon Sep 17 00:00:00 2001 From: Sebastian Kempken Date: Thu, 7 Dec 2023 20:03:00 +0100 Subject: [PATCH] ISSUE-1955: moveTaskToBack within minimizeApp --- .../src/main/java/com/capacitorjs/plugins/app/AppPlugin.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/android/src/main/java/com/capacitorjs/plugins/app/AppPlugin.java b/app/android/src/main/java/com/capacitorjs/plugins/app/AppPlugin.java index 916ad391a..0ca7fa152 100644 --- a/app/android/src/main/java/com/capacitorjs/plugins/app/AppPlugin.java +++ b/app/android/src/main/java/com/capacitorjs/plugins/app/AppPlugin.java @@ -108,10 +108,7 @@ public void getState(PluginCall call) { @PluginMethod public void minimizeApp(PluginCall call) { - Intent startMain = new Intent(Intent.ACTION_MAIN); - startMain.addCategory(Intent.CATEGORY_HOME); - startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - getActivity().startActivity(startMain); + getActivity().moveTaskToBack(true); call.resolve(); }