kopia lustrzana https://github.com/ge0rg/aprsdroid
smart beaconing option
rodzic
ef731ff5f0
commit
1b7fadce60
|
|
@ -43,6 +43,10 @@
|
|||
<TextView
|
||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
||||
android:text="@string/ad_thanks_4" />
|
||||
<TextView
|
||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
||||
android:autoLink="web"
|
||||
android:text="@string/ad_thanks_5" />
|
||||
<TextView
|
||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@
|
|||
<string name="ad_thanks_2">Dirk, DB5OY: motivation and support</string>
|
||||
<string name="ad_thanks_3">Bastian, DB1BM: AFSK implementation</string>
|
||||
<string name="ad_thanks_4">Matti, OH2MQK and John, AB0OO: Java APRS</string>
|
||||
<string name="ad_thanks_5">SmartBeaconing™ by HamHUD Nichetronix, LLC, http://hamhud.net</string>
|
||||
<string name="ad_trans">\n\nTranslation:</string>
|
||||
<string name="ad_homepage">Home Page</string>
|
||||
|
||||
|
|
@ -183,6 +184,8 @@
|
|||
<string name="p__position">Position Reports</string>
|
||||
<string name="p__position_summary">Configuration for sending position reports</string>
|
||||
<string name="p__location">Location Settings</string>
|
||||
<string name="p_smartbeaconing">SmartBeaconing™</string>
|
||||
<string name="p_smartbeaconing_summary">fully automatic beacon config. ignores interval and distance</string>
|
||||
<string name="p_interval">Minimum update time</string>
|
||||
<string name="p_interval_summary">Minutes between beacon transmissions</string>
|
||||
<string name="p_interval_entry">Enter the update interval [min]</string>
|
||||
|
|
|
|||
|
|
@ -64,6 +64,12 @@
|
|||
<PreferenceCategory
|
||||
android:title="@string/p__location">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="smartbeaconing"
|
||||
android:defaultValue="true"
|
||||
android:title="@string/p_smartbeaconing"
|
||||
android:summary="@string/p_smartbeaconing_summary" />
|
||||
|
||||
<EditTextPreference
|
||||
android:key="interval"
|
||||
android:inputType="number"
|
||||
|
|
|
|||
|
|
@ -260,12 +260,10 @@ class AprsService extends Service with LocationListener {
|
|||
override def onLocationChanged(location : Location) {
|
||||
val upd_int = prefs.getStringInt("interval", 10) * 60000
|
||||
val upd_dist = prefs.getStringInt("distance", 10) * 1000
|
||||
//Log.d(TAG, "onLocationChanged: n=" + location)
|
||||
//Log.d(TAG, "onLocationChanged: l=" + lastLoc)
|
||||
if (/* smart beaconing == */ true) {
|
||||
if (prefs.getBoolean("smartbeaconing", true)) {
|
||||
if (!smartBeaconCheck(location))
|
||||
return
|
||||
} else
|
||||
} else /* no smartbeaconing */
|
||||
if (lastLoc != null &&
|
||||
(location.getTime - lastLoc.getTime < (upd_int - getGpsInterval()) ||
|
||||
location.distanceTo(lastLoc) < upd_dist)) {
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue