Fossil/Skagen Hybrids: Update navigationApp to 1.1

Changes:
- Support locking (keep visible and let hands display time)
- Support merge navigation instruction
- Support wrist flick gesture to move hands
- Support GB-configurable foreground and vibration behaviour
This commit is contained in:
Arjan Schrijver 2023-12-23 22:04:56 +01:00
parent 5ffed2aa62
commit 7aeb0dd2ef
6 changed files with 34 additions and 2 deletions

View File

@ -39,7 +39,7 @@ public final class QHybridConstants {
put("weatherApp", "3.11");
put("wellnessApp", "3.16");
put("AlexaApp", "3.11");
put("navigationApp", "1.0");
put("navigationApp", "1.1");
}
};

View File

@ -2082,6 +2082,7 @@ public class FossilHRWatchAdapter extends FossilWatchAdapter {
}
public void onSetNavigationInfo(NavigationInfoSpec navigationInfoSpec) {
SharedPreferences prefs = getDeviceSpecificPreferences();
String installedAppsJson = getDeviceSupport().getDevice().getDeviceInfo("INSTALLED_APPS").getDetails();
if (installedAppsJson == null || !installedAppsJson.contains("navigationApp")) {
if (!notifiedAboutMissingNavigationApp) {
@ -2106,6 +2107,8 @@ public class FossilHRWatchAdapter extends FossilWatchAdapter {
.put("eta", navigationInfoSpec.ETA)
.put("instruction", navigationInfoSpec.instruction)
.put("nextAction", navigationInfoSpec.nextAction)
.put("autoFg", prefs.getBoolean("fossil_hr_nav_auto_foreground", true))
.put("vibrate", prefs.getBoolean("fossil_hr_nav_vibrate", true))
)
)
);

View File

@ -0,0 +1,8 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#7E7E7E"
android:viewportHeight="24"
android:viewportWidth="24">
<path android:fillColor="#000000" android:pathData="M6.41,21L5,19.59l4.83,-4.83c0.75,-0.75 1.17,-1.77 1.17,-2.83v-5.1L9.41,8.41L8,7l4,-4l4,4l-1.41,1.41L13,6.83v5.1c0,1.06 0.42,2.08 1.17,2.83L19,19.59L17.59,21L12,15.41L6.41,21z"/>
</vector>

View File

@ -131,4 +131,25 @@
android:targetClass="nodomain.freeyourgadget.gadgetbridge.devices.qhybrid.CalibrationActivity" />
</Preference>
<PreferenceScreen
android:icon="@drawable/baseline_merge_24"
android:title="Navigation instructions"
android:summary="Configure on-watch navigation app behavior"
android:key="navigation_app_config">
<SwitchPreferenceCompat
android:defaultValue="true"
android:key="fossil_hr_nav_auto_foreground"
android:title="Come to foreground"
android:summary="Whether the navigation app should automatically come to the foreground when it receives a navigation instruction"
android:icon="@drawable/ic_info"/>
<SwitchPreferenceCompat
android:defaultValue="true"
android:key="fossil_hr_nav_vibrate"
android:title="Vibrate on new instruction"
android:summary="Whether the watch should vibrate on every new or changed navigation instruction (only when the app is in the foreground)"
android:icon="@drawable/ic_action_find_lost_device"/>
</PreferenceScreen>
</androidx.preference.PreferenceScreen>

@ -1 +1 @@
Subproject commit 1675b38983b78ac306b0ee860806b754230d9f55
Subproject commit 3c900774207d9dd904886433d672d22d5bd0dea4