add option to enable sunrise/sunset on the timeline

Also fix a small type Aquire -> Acquire
here
Andreas Shimokawa 2016-05-29 21:29:27 +02:00
parent c9aad271da
commit 2e8d96e995
3 changed files with 14 additions and 1 deletions

View File

@ -36,6 +36,10 @@ public class AlarmReceiver extends BroadcastReceiver {
@Override
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");
final GregorianCalendar dateTimeTomorrow = new GregorianCalendar();

View File

@ -76,8 +76,11 @@
<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_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_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_longitude">Longitude</string>

View File

@ -215,6 +215,10 @@
android:key="pebble_activitytracker"
android:title="@string/pref_title_pebble_activitytracker"
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
android:title="@string/pref_header_location">
@ -222,10 +226,12 @@
android:key="location_aquire"
android:title="@string/pref_title_location_aquire"/>
<EditTextPreference
android:digits="0123456789."
android:defaultValue="0"
android:key="location_latitude"
android:title="@string/pref_title_location_latitude" />
<EditTextPreference
android:digits="0123456789."
android:defaultValue="0"
android:key="location_longitude"
android:title="@string/pref_title_location_longitude" />