Skip to content

Satellite tracker and pass predictor for Android, inspired by Gpredict

Added ground station preferences and location switcher

Arty Bishop3bf511019e71
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index f63f7de3..89e2fd7a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -7,14 +7,20 @@
<string name="menu_radar">Radar View</string>
<string name="menu_map">Map View</string>
<string name="menu_settings">Settings</string>
- <string name="menu_about">About</string>
- <string name="menu_github">GitHub</string>
+ <string name="menu_about">About the App</string>
+ <string name="menu_github">Go to GitHub</string>
<string name="menu_credits">Credits</string>
+ <string name="device_location_summary">Allow the app to get your location</string>
<string name="latitude">Latitude:</string>
- <string name="latitude_def">-90.0000</string>
+ <string name="latitude_def">-30.0000</string>
+ <string name="latitude_summary">Ground station latitude from -90 to 90</string>
<string name="longitude">Longitude:</string>
- <string name="longitude_def">-180.0000</string>
+ <string name="longitude_def">-60.0000</string>
+ <string name="longitude_summary">Ground station longitude from -180 to 180</string>
+ <string name="height">Height:</string>
+ <string name="height_def">64</string>
+ <string name="height_summary">Ground station height in meters AMSL</string>
<string name="placeholder">Placeholder</string>
</resources>
diff --git a/app/src/main/res/xml/preference.xml b/app/src/main/res/xml/preference.xml
index e9486b81..2cf6eeda 100644
--- a/app/src/main/res/xml/preference.xml
+++ b/app/src/main/res/xml/preference.xml
@@ -1,13 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
- <PreferenceCategory android:title="@string/placeholder">
+ <PreferenceCategory android:title="Ground station location">
+ <SwitchPreference
+ android:defaultValue="true"
+ android:disableDependentsState="true"
+ android:key="DEVICE_LOCATION"
+ android:summary="@string/device_location_summary"
+ android:title="Use device location" />
<EditTextPreference
- android:key="username"
- android:summary="@string/placeholder"
- android:title="@string/placeholder" />
+ android:defaultValue="@string/latitude_def"
+ android:dependency="DEVICE_LOCATION"
+ android:key="LATITUDE"
+ android:summary="@string/latitude_summary"
+ android:title="@string/latitude" />
<EditTextPreference
- android:key="password"
- android:summary="@string/placeholder"
- android:title="@string/placeholder" />
+ android:defaultValue="@string/longitude_def"
+ android:dependency="DEVICE_LOCATION"
+ android:key="LONGITUDE"
+ android:summary="@string/longitude_summary"
+ android:title="@string/longitude" />
+ <EditTextPreference
+ android:defaultValue="@string/height_def"
+ android:dependency="DEVICE_LOCATION"
+ android:key="HEIGHT"
+ android:summary="@string/height_summary"
+ android:title="@string/height" />
</PreferenceCategory>
</PreferenceScreen>
\ No newline at end of file