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

add test mode to allow testing KalSMS on a phone that is also being used for normal messaging; allow user to configure specific phone numbers to handle

This commit is contained in:
Jesse Young
2011-09-19 14:58:23 -07:00
parent 3357de7e4e
commit eb808372f8
13 changed files with 307 additions and 33 deletions

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<EditText xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/add_test_sender_text"
android:layout_width="fill_parent"
android:inputType="phone"
android:layout_height="wrap_content">
</EditText>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp"
android:textColor="#ffffff"
android:textStyle="bold"
android:textSize="16sp" >
</TextView>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="#333333">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10sp"
android:text="@string/test_senders">
</TextView>
<ListView android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1" />
<Button
android:id="@+id/add_test_phone_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:onClick="addTestSender"
android:text="Add Test Sender" />
</LinearLayout>

View File

@ -1,10 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">KalSMS 2</string>
<string name="app_name">KalSMS</string>
<string name="settings">Settings</string>
<string name="test">Test Connection</string>
<string name="check_now">Check Messages</string>
<string name="help">Help</string>
<string name="retry_now">Retry</string>
<string name="forward_inbox">Fwd Inbox...</string>
<string name='test_senders'>When running KalSMS in Test Mode,
KalSMS will only forward SMS messages from the phone numbers
listed below. (Incoming SMS messages from other phone numbers will be saved
in the normal Messaging inbox, and outgoing messages will be ignored.)</string>
</resources>

View File

@ -4,7 +4,7 @@
<CheckBoxPreference
android:key="enabled"
android:title="Enable KalSMS?"
android:title="Enable KalSMS"
android:defaultValue='false'
android:summaryOn="All new SMS will be forwarded between phone and server"
android:summaryOff="New SMS will not be forwarded between phone and server"
@ -13,12 +13,14 @@
<EditTextPreference
android:key="server_url"
android:title="Server URL"
android:inputType="textUri"
android:defaultValue=""
></EditTextPreference>
<EditTextPreference
android:key="phone_number"
android:title="Your phone number"
android:inputType="phone"
android:defaultValue=""
></EditTextPreference>
@ -38,7 +40,7 @@
<CheckBoxPreference
android:key="keep_in_inbox"
android:title="Keep new messages?"
android:title="Keep new messages"
android:summaryOff="Incoming SMS will not be stored in Messaging inbox"
android:summaryOn="Incoming SMS will be stored in Messaging inbox"
></CheckBoxPreference>
@ -50,6 +52,25 @@
android:entries="@array/wifi_sleep_policies"
android:entryValues="@array/wifi_sleep_policies_values"
>
</ListPreference>
</ListPreference>
<CheckBoxPreference
android:key="test_mode"
android:title="Test mode"
android:summaryOff="Test mode is off (KalSMS forwards all SMS)"
android:summaryOn="Test mode is on (KalSMS only forwards SMS to/from specific phones)"
></CheckBoxPreference>
<PreferenceScreen
android:key="test_numbers"
android:title="Sender phones"
android:dependency="test_mode"
android:summary="Configure the phone numbers that KalSMS will handle"
>
<intent
android:action="android.intent.action.MAIN"
android:targetPackage="org.envaya.kalsms"
android:targetClass="org.envaya.kalsms.ui.TestPhoneNumbers" />
</PreferenceScreen>
</PreferenceScreen>