diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 6de18d64..9886b5bf 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -163,6 +163,11 @@ + + + + + diff --git a/library/src/main/java/candybar/lib/helpers/IntentHelper.java b/library/src/main/java/candybar/lib/helpers/IntentHelper.java index 91fe6b96..e2cd976c 100644 --- a/library/src/main/java/candybar/lib/helpers/IntentHelper.java +++ b/library/src/main/java/candybar/lib/helpers/IntentHelper.java @@ -37,6 +37,7 @@ public class IntentHelper { private static final String ACTION_NOVA_LAUNCHER = "com.novalauncher.THEME"; private static final String ACTION_ONEPLUS_PICK_ICON = "net.oneplus.launcher.icons.ACTION_PICK_ICON"; private static final String ACTION_PLUS_HOME = "jp.co.a_tm.android.launcher.icons.ACTION_PICK_ICON"; + private static final String ACTION_PROJECTIVY_PICK_ICON = "com.spocky.projengmenu.icons.ACTION_PICK_ICON"; public static int getAction(@Nullable Intent intent) { if (intent == null) return ACTION_DEFAULT; @@ -49,6 +50,7 @@ public static int getAction(@Nullable Intent intent) { case ACTION_NOVA_LAUNCHER: case ACTION_ONEPLUS_PICK_ICON: case ACTION_PLUS_HOME: + case ACTION_PROJECTIVY_PICK_ICON: return ICON_PICKER; case Intent.ACTION_PICK: case Intent.ACTION_GET_CONTENT: diff --git a/library/src/main/java/candybar/lib/helpers/LauncherHelper.java b/library/src/main/java/candybar/lib/helpers/LauncherHelper.java index 43169771..094b4e11 100644 --- a/library/src/main/java/candybar/lib/helpers/LauncherHelper.java +++ b/library/src/main/java/candybar/lib/helpers/LauncherHelper.java @@ -138,6 +138,11 @@ public enum Launcher { R.drawable.ic_launcher_pixel, new String[]{"com.google.android.apps.nexuslauncher"}, false), + PROJECTIVY( + "Projectivy", + R.drawable.ic_launcher_projectivy, + new String[]{"com.spocky.projengmenu"}, + true), SMART( "Smart", R.drawable.ic_launcher_smart, @@ -690,6 +695,26 @@ private static void applyLauncher(@NonNull Context context, String launcherPacka case POCO: applyManual(context, launcherPackage, launcherName, "com.miui.home.settings.HomeSettingsActivity"); break; + case PROJECTIVY: + try { + final Intent projectivy = new Intent("com.spocky.projengmenu.APPLY_ICONPACK"); + projectivy.setPackage("com.spocky.projengmenu"); + projectivy.putExtra("com.spocky.projengmenu.extra.ICONPACK_PACKAGENAME", context.getPackageName()); + projectivy.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + context.startActivity(projectivy); + ((AppCompatActivity) context).finish(); + CandyBarApplication.getConfiguration().getAnalyticsHandler().logEvent( + "click", + new HashMap() {{ + put("section", "apply"); + put("action", "confirm"); + put("launcher", launcherPackage); + }} + ); + } catch (ActivityNotFoundException | NullPointerException e) { + openGooglePlay(context, launcherPackage, launcherName); + } + break; case ONEUI: applyOneUI(context, launcherName); break; diff --git a/library/src/main/res/drawable-xxxhdpi/ic_launcher_projectivy.png b/library/src/main/res/drawable-xxxhdpi/ic_launcher_projectivy.png new file mode 100644 index 00000000..4b66f79c Binary files /dev/null and b/library/src/main/res/drawable-xxxhdpi/ic_launcher_projectivy.png differ diff --git a/library/src/main/res/values/launchers.xml b/library/src/main/res/values/launchers.xml index d5fa01a7..feae5474 100644 --- a/library/src/main/res/values/launchers.xml +++ b/library/src/main/res/values/launchers.xml @@ -31,6 +31,7 @@ oxygenos pixel poco + projectivy realme_ui samsung_one_ui smart diff --git a/library/src/main/res/xml/dashboard_contributors.xml b/library/src/main/res/xml/dashboard_contributors.xml index f840baad..07cc8f5d 100644 --- a/library/src/main/res/xml/dashboard_contributors.xml +++ b/library/src/main/res/xml/dashboard_contributors.xml @@ -49,6 +49,12 @@ image="https://github.com/maxtron95.png" link="https://github.com/maxtron95" /> + +