mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +01:00
Pebble: Allow to select the preferred activity tracker via settings activity (Health, Misfit, Morpheuz)
This commit is contained in:
parent
cc42583885
commit
70ae5a2a3a
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
####Version (next)
|
####Version (next)
|
||||||
* Pebble: Support Pebble Health: steps/activity data are stored correctly. Sleep time is considered as light sleep. Deep sleep is discarded. The pebble will send data where it deems appropriate, there is no action to perform on the watch for this to happen.
|
* Pebble: Support Pebble Health: steps/activity data are stored correctly. Sleep time is considered as light sleep. Deep sleep is discarded. The pebble will send data where it deems appropriate, there is no action to perform on the watch for this to happen.
|
||||||
|
* Pebble: Fix support for newer version of morpheuz (>=3.3?)
|
||||||
|
* Pebble: Allow to select the preferred activity tracker via settings activity (Health, Misfit, Morpheuz)
|
||||||
* Mi Band: improvements to pairing
|
* Mi Band: improvements to pairing
|
||||||
|
|
||||||
####Version 0.7.4
|
####Version 0.7.4
|
||||||
|
@ -112,6 +112,7 @@ public class SettingsActivity extends AbstractSettingsActivity {
|
|||||||
"notification_mode_calls",
|
"notification_mode_calls",
|
||||||
"notification_mode_sms",
|
"notification_mode_sms",
|
||||||
"notification_mode_k9mail",
|
"notification_mode_k9mail",
|
||||||
|
"pebble_activitytracker",
|
||||||
"pebble_emu_addr",
|
"pebble_emu_addr",
|
||||||
"pebble_emu_port",
|
"pebble_emu_port",
|
||||||
"pebble_reconnect_attempts",
|
"pebble_reconnect_attempts",
|
||||||
|
@ -45,13 +45,19 @@ public class PebbleCoordinator extends AbstractDeviceCoordinator {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SampleProvider getSampleProvider() {
|
public SampleProvider getSampleProvider() {
|
||||||
// FIXME: make this configurable somewhere else.
|
|
||||||
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(GBApplication.getContext());
|
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(GBApplication.getContext());
|
||||||
if (sharedPrefs.getBoolean("pebble_force_untested", false)) {
|
int activityTracker = Integer.parseInt(sharedPrefs.getString("pebble_activitytracker", Integer.toString(SampleProvider.PROVIDER_PEBBLE_HEALTH)));
|
||||||
//return new PebbleGadgetBridgeSampleProvider();
|
switch (activityTracker) {
|
||||||
return new HealthSampleProvider();
|
case SampleProvider.PROVIDER_PEBBLE_HEALTH:
|
||||||
} else {
|
return new HealthSampleProvider();
|
||||||
return new MorpheuzSampleProvider();
|
case SampleProvider.PROVIDER_PEBBLE_MISFIT:
|
||||||
|
return new MisfitSampleProvider();
|
||||||
|
case SampleProvider.PROVIDER_PEBBLE_MORPHEUZ:
|
||||||
|
return new MorpheuzSampleProvider();
|
||||||
|
case SampleProvider.PROVIDER_PEBBLE_GADGETBRIDGE:
|
||||||
|
return new PebbleGadgetBridgeSampleProvider();
|
||||||
|
default:
|
||||||
|
return new HealthSampleProvider();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,4 +59,16 @@
|
|||||||
<item>@string/p_alarm_clock</item>
|
<item>@string/p_alarm_clock</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="pebble_activitytracker">
|
||||||
|
<item name="4">Pebble Health</item>
|
||||||
|
<item name="3">Misfit</item>
|
||||||
|
<item name="1">Morpheuz</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="pebble_activitytracker_values">
|
||||||
|
<item>4</item>
|
||||||
|
<item>3</item>
|
||||||
|
<item>1</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@ -62,6 +62,7 @@
|
|||||||
<string name="pref_title_development_miaddr">Mi Band address</string>
|
<string name="pref_title_development_miaddr">Mi Band address</string>
|
||||||
|
|
||||||
<string name="pref_title_pebble_settings">Pebble Settings</string>
|
<string name="pref_title_pebble_settings">Pebble Settings</string>
|
||||||
|
<string name="pref_title_pebble_activitytracker">Preferred Activitytracker</string>
|
||||||
<string name="pref_title_enable_pebblekit">Allow 3rd Party Android App Access</string>
|
<string name="pref_title_enable_pebblekit">Allow 3rd Party Android App Access</string>
|
||||||
<string name="pref_summary_enable_pebblekit">Enable experimental support for Android Apps using PebbleKit</string>
|
<string name="pref_summary_enable_pebblekit">Enable experimental support for Android Apps using PebbleKit</string>
|
||||||
<string name="pref_title_pebble_forceprotocol">Force Notification Protocol</string>
|
<string name="pref_title_pebble_forceprotocol">Force Notification Protocol</string>
|
||||||
|
@ -180,6 +180,12 @@
|
|||||||
android:key="pebble_reconnect_attempts"
|
android:key="pebble_reconnect_attempts"
|
||||||
android:maxLength="4"
|
android:maxLength="4"
|
||||||
android:title="@string/pref_title_pebble_reconnect_attempts" />
|
android:title="@string/pref_title_pebble_reconnect_attempts" />
|
||||||
|
<ListPreference
|
||||||
|
android:defaultValue="4"
|
||||||
|
android:entries="@array/pebble_activitytracker"
|
||||||
|
android:entryValues="@array/pebble_activitytracker_values"
|
||||||
|
android:key="pebble_activitytracker"
|
||||||
|
android:title="@string/pref_title_pebble_activitytracker" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:key="pref_key_development"
|
android:key="pref_key_development"
|
||||||
|
Loading…
Reference in New Issue
Block a user