mirror of
https://github.com/cwinfo/envayasms.git
synced 2025-06-25 18:29:24 +00:00
do http requests in AsyncTask so they don't freeze the UI thread; improve log messages; make poll interval configurable
This commit is contained in:
@ -3,11 +3,14 @@
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" android:background="#333333">
|
||||
<ScrollView android:id="@+id/info_scroll" android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" android:layout_weight="1">
|
||||
<TextView
|
||||
android:scrollbars="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:id="@+id/info"
|
||||
android:textColor="#FFFFFF"
|
||||
android:layout_margin="5px"></TextView>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
27
res/values/arrays.xml
Executable file
27
res/values/arrays.xml
Executable file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string-array name="check_intervals">
|
||||
<item>15 sec</item>
|
||||
<item>30 sec</item>
|
||||
<item>1 minute</item>
|
||||
<item>2 minutes</item>
|
||||
<item>5 minutes</item>
|
||||
<item>10 minutes</item>
|
||||
<item>30 minutes</item>
|
||||
<item>1 hour</item>
|
||||
<item>never</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="check_intervals_values">
|
||||
<item>15</item>
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
<item>120</item>
|
||||
<item>300</item>
|
||||
<item>600</item>
|
||||
<item>1800</item>
|
||||
<item>3600</item>
|
||||
<item>0</item>
|
||||
</string-array>
|
||||
</resources>
|
@ -4,13 +4,13 @@
|
||||
<EditTextPreference
|
||||
android:key="server_url"
|
||||
android:title="Server URL"
|
||||
android:defaultValue="http://192.168.70.1:3000/"
|
||||
></EditTextPreference>
|
||||
android:defaultValue=""
|
||||
></EditTextPreference>
|
||||
|
||||
<EditTextPreference
|
||||
android:key="phone_number"
|
||||
android:title="Your Phone Number"
|
||||
android:defaultValue="16507993371"
|
||||
android:defaultValue=""
|
||||
></EditTextPreference>
|
||||
|
||||
<EditTextPreference
|
||||
@ -18,10 +18,20 @@
|
||||
android:title="Password"
|
||||
android:password="true"
|
||||
></EditTextPreference>
|
||||
|
||||
<ListPreference
|
||||
android:key="outgoing_interval"
|
||||
android:title="Poll interval"
|
||||
android:defaultValue="60"
|
||||
android:entries="@array/check_intervals"
|
||||
android:entryValues="@array/check_intervals_values"
|
||||
></ListPreference>
|
||||
|
||||
<!--
|
||||
<CheckBoxPreference
|
||||
android:key="detailed_log"
|
||||
android:title="Detailed log messages?"
|
||||
android:disableDependentsState="false"
|
||||
></CheckBoxPreference>
|
||||
-->
|
||||
</PreferenceScreen>
|
Reference in New Issue
Block a user