From f33e72474163d6fc6b63caf3b04648a6363873c3 Mon Sep 17 00:00:00 2001 From: Pedro Diaz Date: Tue, 27 Sep 2016 08:22:00 -0400 Subject: [PATCH 1/3] - Removed notification vibration - Minor text fixes - Removed "fast" from pokemon first move --- .../snorlax/module/feature/encounter/Encounter.java | 10 ++++++---- .../feature/encounter/EncounterNotification.java | 2 +- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/icecream/snorlax/module/feature/encounter/Encounter.java b/app/src/main/java/com/icecream/snorlax/module/feature/encounter/Encounter.java index 478f22a..62a5fbb 100644 --- a/app/src/main/java/com/icecream/snorlax/module/feature/encounter/Encounter.java +++ b/app/src/main/java/com/icecream/snorlax/module/feature/encounter/Encounter.java @@ -64,10 +64,12 @@ public final class Encounter implements Feature { private String formatMove(String move) { StringBuilder builder = new StringBuilder(); for (String part : move.split("_")) { - builder - .append(part.charAt(0)) - .append(part.substring(1).toLowerCase(Locale.US)) - .append(" "); + if (!part.equalsIgnoreCase("fast")) { + builder + .append(part.charAt(0)) + .append(part.substring(1).toLowerCase(Locale.US)) + .append(" "); + } } return builder.toString().trim(); } diff --git a/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java b/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java index 93b6105..b83cf00 100644 --- a/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java +++ b/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java @@ -83,7 +83,7 @@ void show(int pokemonNumber, String pokemonName, double iv, int attack, int defe ) .setColor(ContextCompat.getColor(mContext, R.color.red_700)) .setAutoCancel(true) - .setVibrate(new long[]{0, 60, 300, 60}) + //.setVibrate(new long[]{0, 60, 300, 60}) .setPriority(Notification.PRIORITY_MAX) .setCategory(NotificationCompat.CATEGORY_ALARM) .build(); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 30665d7..940c918 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -37,7 +37,7 @@ Encounter Notifications encounter_notification_key Enable encounter notifications - Show encountered encounterPokemon stats via system notification + Show encounter pokemons stats via system notification Catch Notifications catch_notification_key From b33ae3ea35c5ea9be80c238d4001277f1e316fac Mon Sep 17 00:00:00 2001 From: Pedro Diaz Date: Tue, 27 Sep 2016 08:35:11 -0400 Subject: [PATCH 2/3] Now vibration is removed without losing the head up --- .../snorlax/module/feature/encounter/EncounterNotification.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java b/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java index b83cf00..c51fc80 100644 --- a/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java +++ b/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java @@ -84,6 +84,7 @@ void show(int pokemonNumber, String pokemonName, double iv, int attack, int defe .setColor(ContextCompat.getColor(mContext, R.color.red_700)) .setAutoCancel(true) //.setVibrate(new long[]{0, 60, 300, 60}) + .setVibrate(new long[]{0}) .setPriority(Notification.PRIORITY_MAX) .setCategory(NotificationCompat.CATEGORY_ALARM) .build(); From 592a56972eeb35b348e1df2ce26a63f826176374 Mon Sep 17 00:00:00 2001 From: Pedro Diaz Date: Tue, 27 Sep 2016 09:10:45 -0400 Subject: [PATCH 3/3] Now vibration is removed without losing the head up --- .../feature/encounter/EncounterNotification.java | 6 +++--- .../module/feature/encounter/EncounterPokemon.java | 10 ++++++---- app/src/main/res/values/strings.xml | 6 +++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java b/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java index c51fc80..01ec47e 100644 --- a/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java +++ b/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterNotification.java @@ -70,10 +70,10 @@ void show(int pokemonNumber, String pokemonName, double iv, int attack, int defe getLargeIconHeight(), false )) - .setContentTitle(mContext.getString(R.string.notification_title, pokemonName)) - .setContentText(mContext.getString(R.string.notification_content, iv, attack, defense, stamina, cp, level, hp)) + .setContentTitle(mContext.getString(R.string.notification_title, pokemonName, cp, hp, level)) + .setContentText(mContext.getString(R.string.notification_content, iv, attack, defense, stamina)) .setStyle(new NotificationCompat.InboxStyle() - .addLine(mContext.getString(R.string.notification_categoty_stats_content, iv, attack, defense, stamina, cp, level, hp)) + .addLine(mContext.getString(R.string.notification_categoty_stats_content, iv, attack, defense, stamina)) .addLine(getBoldSpannable(mContext.getString(R.string.notification_categoty_moves_title))) .addLine(mContext.getString(R.string.notification_categoty_moves_content, move1, move2)) .addLine(getBoldSpannable(mContext.getString(R.string.notification_categoty_catch_title))) diff --git a/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterPokemon.java b/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterPokemon.java index 5a707b2..3d37d07 100644 --- a/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterPokemon.java +++ b/app/src/main/java/com/icecream/snorlax/module/feature/encounter/EncounterPokemon.java @@ -37,10 +37,12 @@ int getNumber() { String getName() { StringBuilder builder = new StringBuilder(); for (String part : mPokemon.getPokemonId().name().split("_")) { - builder - .append(part.charAt(0)) - .append(part.substring(1).toLowerCase(Locale.US)) - .append(" "); + if (!part.equalsIgnoreCase("male") && !part.equalsIgnoreCase("female")) { + builder + .append(part.charAt(0)) + .append(part.substring(1).toLowerCase(Locale.US)) + .append(" "); + } } return builder.toString().trim(); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 940c918..8575c84 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -15,11 +15,11 @@ Install xposed to use Snorlax Install Pokemon Go to launch it - %1$s has appeared! - IV %1$4.1f%% %2$d/%3$d/%4$d - CP %5$d - LV %6$3.1f - HP %7$d + %1$s (CP %2$d HP %3$d) LV %4$3.1f + %1$4.1f%% [A/D/S %2$d/%3$d/%4$d] Stats - IV %1$4.1f%% %2$d/%3$d/%4$d - CP %5$d - LV %6$3.1f - HP %7$d + %1$4.1f%% [A/D/S %2$d/%3$d/%4$d] Moves %1$s - %2$s