Skip to content

Commit

Permalink
8.6.0 - Added no notification options for end of session and interval…
Browse files Browse the repository at this point in the history
…s. Notice, Forerunner series has internal notification for start/end/save sessions, this can't be disabled.
  • Loading branch information
dliedke committed Dec 14, 2024
1 parent 30af8d0 commit 7c628a2
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Meditate/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. -->
<iq:manifest xmlns:iq="http://www.garmin.com/xml/connectiq" version="3">
<iq:application entry="MeditateApp" id="9abb375dcf7c4ace87ff66f4f774f6c8" launcherIcon="@Drawables.launcherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watch-app" version="8.5.0">
<iq:application entry="MeditateApp" id="9abb375dcf7c4ace87ff66f4f774f6c8" launcherIcon="@Drawables.launcherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watch-app" version="8.6.0">
<iq:products>
<iq:product id="approachs62"/>
<iq:product id="approachs7042mm"/>
Expand Down
4 changes: 3 additions & 1 deletion Meditate/resources-deu/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
<string id="intervalAlertTransparentColorText">Transparent</string>

<string id="vibePatternMenu_title">Vibra/Ton</string>
<string id="vibePatternMenu_noNotification">Keine Benach.</string>
<string id="vibePatternMenu_longPulsating">Lang pulsierend</string>
<string id="vibePatternMenu_longSound">Langer Ton</string>
<string id="vibePatternMenu_longContinuous">Lang anhaltend</string>
Expand All @@ -138,6 +139,7 @@
<string id="vibePatternMenu_shortAscending">Kurz ansteigend</string>

<string id="intervalVibePatternMenu_title">Vibra/Ton</string>
<string id="intervalVibePatternMenu_noNotification">Keine Benach.</string>
<string id="intervalVibePatternMenu_shorterContinuous">Kürzer anhaltend</string>
<string id="intervalVibePatternMenu_shorterAscending">Kürzer aufsteigend</string>
<string id="intervalVibePatternMenu_blip">Piepton</string>
Expand All @@ -163,7 +165,7 @@
<string id="HRVready">HRV Bereit</string>
<string id="HRVoff">HRV aus</string>

<string id="about_AppVersion">Meditate 8.5.0</string>
<string id="about_AppVersion">Meditate 8.6.0</string>
<string id="about_vtrifonov"> vtrifonov</string>
<string id="about_dliedke"> dliedke</string>
<string id="about_falsetru"> falsetru</string>
Expand Down
4 changes: 3 additions & 1 deletion Meditate/resources-kor/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
<string id="intervalAlertTransparentColorText">투명</string>

<string id="vibePatternMenu_title">진동 / 소리</string>
<string id="vibePatternMenu_noNotification">알림 없음</string>
<string id="vibePatternMenu_longPulsating">긴 진동</string>
<string id="vibePatternMenu_longSound">긴 소리</string>
<string id="vibePatternMenu_longContinuous">길게 연속적</string>
Expand All @@ -138,6 +139,7 @@
<string id="vibePatternMenu_shortAscending">짧게 점점 커짐</string>

<string id="intervalVibePatternMenu_title">진동 / 소리</string>
<string id="intervalVibePatternMenu_noNotification">알림 없음</string>
<string id="intervalVibePatternMenu_shorterContinuous">짧게 연속적</string>
<string id="intervalVibePatternMenu_shorterAscending">짧게 점점 커짐</string>
<string id="intervalVibePatternMenu_blip">삑</string>
Expand All @@ -163,7 +165,7 @@
<string id="HRVready">HRV 준비됨</string>
<string id="HRVoff">HRV 꺼짐</string>

<string id="about_AppVersion">Meditate 8.5.0</string>
<string id="about_AppVersion">Meditate 8.6.0</string>
<string id="about_vtrifonov"> vtrifonov</string>
<string id="about_dliedke"> dliedke</string>
<string id="about_falsetru"> falsetru</string>
Expand Down
4 changes: 3 additions & 1 deletion Meditate/resources-por/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
<string id="intervalAlertTransparentColorText">Transparente</string>

<string id="vibePatternMenu_title">Vibração / Som</string>
<string id="vibePatternMenu_noNotification">Sem Notif.</string>
<string id="vibePatternMenu_longPulsating">Longo pulsante</string>
<string id="vibePatternMenu_longSound">Som Longo</string>
<string id="vibePatternMenu_longContinuous">Longo contínuo</string>
Expand All @@ -138,6 +139,7 @@
<string id="vibePatternMenu_shortAscending">Curto ascendente</string>

<string id="intervalVibePatternMenu_title">Vibração / Som</string>
<string id="intervalVibePatternMenu_noNotification">Sem Notif.</string>
<string id="intervalVibePatternMenu_shorterContinuous">Curto contínuo</string>
<string id="intervalVibePatternMenu_shorterAscending">Curto ascendente</string>
<string id="intervalVibePatternMenu_blip">Bip</string>
Expand All @@ -164,7 +166,7 @@
<string id="HRVready">VFC Pronto</string>
<string id="HRVoff">VFC Deslig.</string>

<string id="about_AppVersion">Meditate 8.5.0</string>
<string id="about_AppVersion">Meditate 8.6.0</string>
<string id="about_vtrifonov"> vtrifonov</string>
<string id="about_dliedke"> dliedke</string>
<string id="about_falsetru"> falsetru</string>
Expand Down
4 changes: 3 additions & 1 deletion Meditate/resources-spa/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
<string id="intervalAlertTransparentColorText">Transparente</string>

<string id="vibePatternMenu_title">Vibración/Son.</string>
<string id="vibePatternMenu_noNotification">Sin Notif.</string>
<string id="vibePatternMenu_longPulsating">Larga pulsante</string>
<string id="vibePatternMenu_longSound">Sonido Largo</string>
<string id="vibePatternMenu_longContinuous">Larga continua</string>
Expand All @@ -138,6 +139,7 @@
<string id="vibePatternMenu_shortAscending">Corta ascendente</string>

<string id="intervalVibePatternMenu_title">Vibración/Son.</string>
<string id="intervalVibePatternMenu_noNotification">Sin Notif.</string>
<string id="intervalVibePatternMenu_shorterContinuous">Más corta continua</string>
<string id="intervalVibePatternMenu_shorterAscending">Más corta ascendente</string>
<string id="intervalVibePatternMenu_blip">Pitido</string>
Expand All @@ -163,7 +165,7 @@
<string id="HRVready">HRV Listo</string>
<string id="HRVoff">HRV apagado</string>

<string id="about_AppVersion">Meditate 8.5.0</string>
<string id="about_AppVersion">Meditate 8.6.0</string>
<string id="about_vtrifonov"> vtrifonov</string>
<string id="about_dliedke"> dliedke</string>
<string id="about_falsetru"> falsetru</string>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<menu id="intervalVibePatternMenu" title="@Strings.intervalVibePatternMenu_title">
<menu-item id="noNotification" label="@Strings.intervalVibePatternMenu_noNotification" />
<menu-item id="blip" label="@Strings.intervalVibePatternMenu_blip" />
<menu-item id="shortSound" label="@Strings.intervalVibePatternMenu_shortSound" />
<menu-item id="shorterContinuous" label="@Strings.intervalVibePatternMenu_shorterContinuous" />
Expand Down
1 change: 1 addition & 0 deletions Meditate/resources/menus/session/vibePatternMenu.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<menu id="vibePatternMenu" title="@Strings.vibePatternMenu_title">
<menu-item id="noNotification" label="@Strings.vibePatternMenu_noNotification" />
<menu-item id="longContinuous" label="@Strings.vibePatternMenu_longContinuous" />
<menu-item id="longSound" label="@Strings.vibePatternMenu_longSound" />
<menu-item id="longPulsating" label="@Strings.vibePatternMenu_longPulsating" />
Expand Down
4 changes: 3 additions & 1 deletion Meditate/resources/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
<string id="intervalAlertTransparentColorText">Transparent</string>

<string id="vibePatternMenu_title">Vibe / Sound</string>
<string id="vibePatternMenu_noNotification">No Notification</string>
<string id="vibePatternMenu_longPulsating">Long pulsating</string>
<string id="vibePatternMenu_longSound">Long Sound</string>
<string id="vibePatternMenu_longContinuous">Long continuous</string>
Expand All @@ -138,6 +139,7 @@
<string id="vibePatternMenu_shortAscending">Short ascending</string>

<string id="intervalVibePatternMenu_title">Vibe / Sound</string>
<string id="intervalVibePatternMenu_noNotification">No Notification</string>
<string id="intervalVibePatternMenu_shorterContinuous">Shorter continuous</string>
<string id="intervalVibePatternMenu_shorterAscending">Shorter ascending</string>
<string id="intervalVibePatternMenu_blip">Blip</string>
Expand All @@ -163,7 +165,7 @@
<string id="HRVready">HRV Ready</string>
<string id="HRVoff">HRV off</string>

<string id="about_AppVersion">Meditate 8.5.0</string>
<string id="about_AppVersion">Meditate 8.6.0</string>
<string id="about_vtrifonov"> vtrifonov</string>
<string id="about_dliedke"> dliedke</string>
<string id="about_falsetru"> falsetru</string>
Expand Down
6 changes: 4 additions & 2 deletions Meditate/source/activity/MeditatePrepareView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 5 additions & 0 deletions Meditate/source/activity/Vibe.mc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ class Vibe {
return;
}

// If no notification just return
if (pattern == VibePattern.NoNotification) {
return;
}

var vibeProfile;
switch (pattern) {
case VibePattern.LongContinuous:
Expand Down
1 change: 1 addition & 0 deletions Meditate/source/sessionSettings/SessionModel.mc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ using HrvAlgorithms.HrvTracking;

module VibePattern {
enum {
NoNotification = 0,
LongPulsating = 1,
LongContinuous = 2,
LongAscending = 3,
Expand Down
2 changes: 2 additions & 0 deletions Meditate/source/sessionSettings/SessionPickerDelegate.mc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions Meditate/source/sessionSettings/VibePatternMenuDelegate.mc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit 7c628a2

Please sign in to comment.