mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-13 03:07:32 +01:00
add option to enable sunrise/sunset on the timeline
Also fix a small type Aquire -> Acquire
This commit is contained in:
parent
c9aad271da
commit
2e8d96e995
@ -36,6 +36,10 @@ public class AlarmReceiver extends BroadcastReceiver {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
|
if (!GBApplication.getPrefs().getBoolean("send_sunrise_sunset", false)) {
|
||||||
|
LOG.info("won't send sunrise and sunset events (disabled in preferences)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
LOG.info("will resend sunrise and sunset events");
|
LOG.info("will resend sunrise and sunset events");
|
||||||
|
|
||||||
final GregorianCalendar dateTimeTomorrow = new GregorianCalendar();
|
final GregorianCalendar dateTimeTomorrow = new GregorianCalendar();
|
||||||
|
@ -76,8 +76,11 @@
|
|||||||
<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_sunrise_sunset">Sunrise and Sunset</string>
|
||||||
|
<string name="pref_summary_sunrise_sunset">Send sunrise and sunset times based on the location to the pebble timeline</string>
|
||||||
|
|
||||||
<string name="pref_header_location">Location</string>
|
<string name="pref_header_location">Location</string>
|
||||||
<string name="pref_title_location_aquire">Aquire Location</string>
|
<string name="pref_title_location_aquire">Acquire Location</string>
|
||||||
<string name="pref_title_location_latitude">Latitude</string>
|
<string name="pref_title_location_latitude">Latitude</string>
|
||||||
<string name="pref_title_location_longitude">Longitude</string>
|
<string name="pref_title_location_longitude">Longitude</string>
|
||||||
|
|
||||||
|
@ -215,6 +215,10 @@
|
|||||||
android:key="pebble_activitytracker"
|
android:key="pebble_activitytracker"
|
||||||
android:title="@string/pref_title_pebble_activitytracker"
|
android:title="@string/pref_title_pebble_activitytracker"
|
||||||
android:summary="%s" />
|
android:summary="%s" />
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:title="@string/pref_title_sunrise_sunset"
|
||||||
|
android:summary="@string/pref_summary_sunrise_sunset"
|
||||||
|
android:key="send_sunrise_sunset" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="@string/pref_header_location">
|
android:title="@string/pref_header_location">
|
||||||
@ -222,10 +226,12 @@
|
|||||||
android:key="location_aquire"
|
android:key="location_aquire"
|
||||||
android:title="@string/pref_title_location_aquire"/>
|
android:title="@string/pref_title_location_aquire"/>
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
|
android:digits="0123456789."
|
||||||
android:defaultValue="0"
|
android:defaultValue="0"
|
||||||
android:key="location_latitude"
|
android:key="location_latitude"
|
||||||
android:title="@string/pref_title_location_latitude" />
|
android:title="@string/pref_title_location_latitude" />
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
|
android:digits="0123456789."
|
||||||
android:defaultValue="0"
|
android:defaultValue="0"
|
||||||
android:key="location_longitude"
|
android:key="location_longitude"
|
||||||
android:title="@string/pref_title_location_longitude" />
|
android:title="@string/pref_title_location_longitude" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user