diff --git a/src/android/ShortcutPlugin.java b/src/android/ShortcutPlugin.java index 287f7f4..fc778c1 100644 --- a/src/android/ShortcutPlugin.java +++ b/src/android/ShortcutPlugin.java @@ -31,6 +31,8 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo Intent i = new Intent(); i.setClassName(this.cordova.getActivity().getPackageName(), this.cordova.getActivity().getClass().getName()); + i.setAction(Intent.ACTION_MAIN); + i.addCategory(Intent.CATEGORY_LAUNCHER); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); @@ -55,6 +57,8 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo Intent i = new Intent(); i.setClassName(this.cordova.getActivity().getPackageName(), this.cordova.getActivity().getClass().getName()); + i.setAction(Intent.ACTION_MAIN); + i.addCategory(Intent.CATEGORY_LAUNCHER); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);