4
0
mirror of https://github.com/cwinfo/envayasms.git synced 2025-06-25 18:29:24 +00:00

use POST in http requests; use different url for outgoing sms; poll for outgoing sms more frequently; notify server when sms messages are sent

This commit is contained in:
Jesse Young
2011-09-11 01:35:10 -07:00
parent 448eafecd8
commit 9473ab1610
21 changed files with 952 additions and 474 deletions

12
res/layout/main.xml Normal file → Executable file
View File

@ -3,11 +3,11 @@
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="#333333">
<TextView
<TextView
android:scrollbars="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
android:textColor="#FFFFFF" android:textSize="30px" android:layout_margin="2px"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/info" android:textColor="#FFFFFF" android:layout_margin="5px"></TextView>
<!--<Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:id="@+id/settingsButton" android:text="Edit Settings" android:layout_marginRight="50px" android:layout_marginLeft="50px"></Button>-->
android:layout_height="fill_parent"
android:id="@+id/info"
android:textColor="#FFFFFF"
android:layout_margin="5px"></TextView>
</LinearLayout>

3
res/values/strings.xml Normal file → Executable file
View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">SMS Gateway Running.\n</string>
<string name="app_name">KalSMS</string>
<string name="app_name">KalSMS Envaya</string>
</resources>

43
res/xml/prefs.xml Normal file → Executable file
View File

@ -1,26 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<EditTextPreference
android:key="server_url"
android:title="Server URL"
android:defaultValue="http://192.168.70.1:3000/"
></EditTextPreference>
<EditTextPreference
android:key="pref_target_url"
android:title="Target URL"
android:summary="URL to load when the SMS is received"
android:defaultValue="http://qkhack.appspot.com/kalsms_demo"
></EditTextPreference>
<EditTextPreference
android:key="pref_identifier"
android:title="SMS Identifier"
android:summary="Handle only SMS messages starting with this string (leave empty to handle all messages)"
android:defaultValue="kal "
></EditTextPreference>
<CheckBoxPreference
android:key="pref_poll_switch"
android:title="Server Polling"
android:disableDependentsState="false"
android:summary="Poll target URL every 15 minutes (Note: increases power usage)"
></CheckBoxPreference>
<EditTextPreference
android:key="phone_number"
android:title="Your Phone Number"
android:defaultValue="16507993371"
></EditTextPreference>
<EditTextPreference
android:key="password"
android:title="Password"
android:password="true"
></EditTextPreference>
<CheckBoxPreference
android:key="detailed_log"
android:title="Detailed log messages?"
android:disableDependentsState="false"
></CheckBoxPreference>
</PreferenceScreen>