From 7c628a25f0bb5f055492ac95716f797dc966b648 Mon Sep 17 00:00:00 2001 From: dliedke Date: Fri, 13 Dec 2024 22:14:53 -0300 Subject: [PATCH] 8.6.0 - Added no notification options for end of session and intervals. Notice, Forerunner series has internal notification for start/end/save sessions, this can't be disabled. --- Meditate/manifest.xml | 2 +- Meditate/resources-deu/strings/strings.xml | 4 +++- Meditate/resources-kor/strings/strings.xml | 4 +++- Meditate/resources-por/strings/strings.xml | 4 +++- Meditate/resources-spa/strings/strings.xml | 4 +++- .../menus/intervalAlerts/intervalVibePatternMenu.xml | 1 + Meditate/resources/menus/session/vibePatternMenu.xml | 1 + Meditate/resources/strings/strings.xml | 4 +++- Meditate/source/activity/MeditatePrepareView.mc | 6 ++++-- Meditate/source/activity/Vibe.mc | 5 +++++ Meditate/source/sessionSettings/SessionModel.mc | 1 + Meditate/source/sessionSettings/SessionPickerDelegate.mc | 2 ++ Meditate/source/sessionSettings/VibePatternMenuDelegate.mc | 3 +++ .../intervalAlerts/IntervalVibePatternMenuDelegate.mc | 5 ++++- 14 files changed, 37 insertions(+), 9 deletions(-) diff --git a/Meditate/manifest.xml b/Meditate/manifest.xml index df7a927..dc68746 100644 --- a/Meditate/manifest.xml +++ b/Meditate/manifest.xml @@ -1,7 +1,7 @@ - + diff --git a/Meditate/resources-deu/strings/strings.xml b/Meditate/resources-deu/strings/strings.xml index 6357214..946de4a 100644 --- a/Meditate/resources-deu/strings/strings.xml +++ b/Meditate/resources-deu/strings/strings.xml @@ -126,6 +126,7 @@ Transparent Vibra/Ton + Keine Benach. Lang pulsierend Langer Ton Lang anhaltend @@ -138,6 +139,7 @@ Kurz ansteigend Vibra/Ton + Keine Benach. Kürzer anhaltend Kürzer aufsteigend Piepton @@ -163,7 +165,7 @@ HRV Bereit HRV aus - Meditate 8.5.0 + Meditate 8.6.0 vtrifonov dliedke falsetru diff --git a/Meditate/resources-kor/strings/strings.xml b/Meditate/resources-kor/strings/strings.xml index ca424b4..fdd16cf 100644 --- a/Meditate/resources-kor/strings/strings.xml +++ b/Meditate/resources-kor/strings/strings.xml @@ -126,6 +126,7 @@ 투명 진동 / 소리 + 알림 없음 긴 진동 긴 소리 길게 연속적 @@ -138,6 +139,7 @@ 짧게 점점 커짐 진동 / 소리 + 알림 없음 짧게 연속적 짧게 점점 커짐 @@ -163,7 +165,7 @@ HRV 준비됨 HRV 꺼짐 - Meditate 8.5.0 + Meditate 8.6.0 vtrifonov dliedke falsetru diff --git a/Meditate/resources-por/strings/strings.xml b/Meditate/resources-por/strings/strings.xml index 462ebd5..f61e7e0 100644 --- a/Meditate/resources-por/strings/strings.xml +++ b/Meditate/resources-por/strings/strings.xml @@ -126,6 +126,7 @@ Transparente Vibração / Som + Sem Notif. Longo pulsante Som Longo Longo contínuo @@ -138,6 +139,7 @@ Curto ascendente Vibração / Som + Sem Notif. Curto contínuo Curto ascendente Bip @@ -164,7 +166,7 @@ VFC Pronto VFC Deslig. - Meditate 8.5.0 + Meditate 8.6.0 vtrifonov dliedke falsetru diff --git a/Meditate/resources-spa/strings/strings.xml b/Meditate/resources-spa/strings/strings.xml index 7f4f2d9..2c5d68f 100644 --- a/Meditate/resources-spa/strings/strings.xml +++ b/Meditate/resources-spa/strings/strings.xml @@ -126,6 +126,7 @@ Transparente Vibración/Son. + Sin Notif. Larga pulsante Sonido Largo Larga continua @@ -138,6 +139,7 @@ Corta ascendente Vibración/Son. + Sin Notif. Más corta continua Más corta ascendente Pitido @@ -163,7 +165,7 @@ HRV Listo HRV apagado - Meditate 8.5.0 + Meditate 8.6.0 vtrifonov dliedke falsetru diff --git a/Meditate/resources/menus/intervalAlerts/intervalVibePatternMenu.xml b/Meditate/resources/menus/intervalAlerts/intervalVibePatternMenu.xml index a7cf774..e0aa6c2 100644 --- a/Meditate/resources/menus/intervalAlerts/intervalVibePatternMenu.xml +++ b/Meditate/resources/menus/intervalAlerts/intervalVibePatternMenu.xml @@ -1,4 +1,5 @@ + diff --git a/Meditate/resources/menus/session/vibePatternMenu.xml b/Meditate/resources/menus/session/vibePatternMenu.xml index 0134f18..7401328 100644 --- a/Meditate/resources/menus/session/vibePatternMenu.xml +++ b/Meditate/resources/menus/session/vibePatternMenu.xml @@ -1,4 +1,5 @@ + diff --git a/Meditate/resources/strings/strings.xml b/Meditate/resources/strings/strings.xml index 3d5090b..9796bb7 100644 --- a/Meditate/resources/strings/strings.xml +++ b/Meditate/resources/strings/strings.xml @@ -126,6 +126,7 @@ Transparent Vibe / Sound + No Notification Long pulsating Long Sound Long continuous @@ -138,6 +139,7 @@ Short ascending Vibe / Sound + No Notification Shorter continuous Shorter ascending Blip @@ -163,7 +165,7 @@ HRV Ready HRV off - Meditate 8.5.0 + Meditate 8.6.0 vtrifonov dliedke falsetru diff --git a/Meditate/source/activity/MeditatePrepareView.mc b/Meditate/source/activity/MeditatePrepareView.mc index bb1dff1..67e9829 100644 --- a/Meditate/source/activity/MeditatePrepareView.mc +++ b/Meditate/source/activity/MeditatePrepareView.mc @@ -37,8 +37,10 @@ class MeditatePrepareView extends Ui.View { // Start the meditation session after XX seconds if (mSeconds == mTotalSeconds+1) { - // Vibrate short to notify session starts - Vibe.vibrate(VibePattern.Blip); + // Vibrate short to notify only when session starts + if (mPrepare == 1) { + Vibe.vibrate(VibePattern.Blip); + } // Starts the meditation session / saves the session continueToNextStep(); diff --git a/Meditate/source/activity/Vibe.mc b/Meditate/source/activity/Vibe.mc index 8e8186a..4566c36 100644 --- a/Meditate/source/activity/Vibe.mc +++ b/Meditate/source/activity/Vibe.mc @@ -9,6 +9,11 @@ class Vibe { return; } + // If no notification just return + if (pattern == VibePattern.NoNotification) { + return; + } + var vibeProfile; switch (pattern) { case VibePattern.LongContinuous: diff --git a/Meditate/source/sessionSettings/SessionModel.mc b/Meditate/source/sessionSettings/SessionModel.mc index e011b99..1577c9d 100644 --- a/Meditate/source/sessionSettings/SessionModel.mc +++ b/Meditate/source/sessionSettings/SessionModel.mc @@ -3,6 +3,7 @@ using HrvAlgorithms.HrvTracking; module VibePattern { enum { + NoNotification = 0, LongPulsating = 1, LongContinuous = 2, LongAscending = 3, diff --git a/Meditate/source/sessionSettings/SessionPickerDelegate.mc b/Meditate/source/sessionSettings/SessionPickerDelegate.mc index 3ab6c34..81cb940 100644 --- a/Meditate/source/sessionSettings/SessionPickerDelegate.mc +++ b/Meditate/source/sessionSettings/SessionPickerDelegate.mc @@ -161,6 +161,8 @@ class SessionPickerDelegate extends ScreenPicker.ScreenPickerDelegate { private static function getVibePatternText(vibePattern) { switch (vibePattern) { + case VibePattern.NoNotification: + return Ui.loadResource(Rez.Strings.vibePatternMenu_noNotification); case VibePattern.LongPulsating: return Ui.loadResource(Rez.Strings.vibePatternMenu_longPulsating); case VibePattern.LongSound: diff --git a/Meditate/source/sessionSettings/VibePatternMenuDelegate.mc b/Meditate/source/sessionSettings/VibePatternMenuDelegate.mc index 1d13f78..bf5daf1 100644 --- a/Meditate/source/sessionSettings/VibePatternMenuDelegate.mc +++ b/Meditate/source/sessionSettings/VibePatternMenuDelegate.mc @@ -9,6 +9,9 @@ class VibePatternMenuDelegate extends Ui.MenuInputDelegate { } function onMenuItem(item) { + if (item == :noNotification) { + me.mOnVibePatternPicked.invoke(VibePattern.NoNotification); + } if (item == :longContinuous) { me.mOnVibePatternPicked.invoke(VibePattern.LongContinuous); } diff --git a/Meditate/source/sessionSettings/intervalAlerts/IntervalVibePatternMenuDelegate.mc b/Meditate/source/sessionSettings/intervalAlerts/IntervalVibePatternMenuDelegate.mc index 7afe54e..1df56f4 100644 --- a/Meditate/source/sessionSettings/intervalAlerts/IntervalVibePatternMenuDelegate.mc +++ b/Meditate/source/sessionSettings/intervalAlerts/IntervalVibePatternMenuDelegate.mc @@ -38,6 +38,9 @@ class IntervalVibePatternMenuDelegate extends Ui.MenuInputDelegate { } else if (item == :shortSound) { me.mOnVibePatternPicked.invoke(VibePattern.ShortSound); - } + } + else if (item == :noNotification) { + me.mOnVibePatternPicked.invoke(VibePattern.NoNotification); + } } } \ No newline at end of file