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

add settings screen for ignored phone numbers; allow user to specify if they want to ignore non-numeric senders and shortcodes

This commit is contained in:
Jesse Young
2011-11-25 19:36:04 -08:00
parent f430ddbe29
commit 22f8c26da1
13 changed files with 317 additions and 85 deletions

View File

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

View File

@ -0,0 +1,38 @@
<?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/ignored_phone_numbers">
</TextView>
<CheckBox android:id="@+id/ignore_shortcodes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="ignoreShortcodesClicked"
android:text="Ignore all shortcodes"
/>
<CheckBox android:id="@+id/ignore_non_numeric"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="ignoreNonNumericClicked"
android:text="Ignore all non-numeric senders"
/>
<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_phone_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:onClick="addIgnoredPhoneNumber"
android:text="Add Ignored Phone Number" />
</LinearLayout>

View File

@ -8,7 +8,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10sp"
android:text="@string/test_senders">
android:text="@string/test_phone_numbers">
</TextView>
<ListView android:id="@android:id/list"
@ -17,12 +17,12 @@
android:layout_weight="1" />
<Button
android:id="@+id/add_test_phone_number"
android:id="@+id/add_phone_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:onClick="addTestSender"
android:text="Add Test Sender" />
android:onClick="addTestPhoneNumber"
android:text="Add Test Phone Number" />
</LinearLayout>

View File

@ -9,8 +9,11 @@
<string name="retry_now">Retry</string>
<string name="forward_inbox">Fwd Inbox...</string>
<string name='service_started'>New SMS will be forwarded to server</string>
<string name='test_senders'>When running EnvayaSMS in Test Mode,
<string name='test_phone_numbers'>When running EnvayaSMS in Test Mode,
EnvayaSMS 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>
<string name='ignored_phone_numbers'>
EnvayaSMS will ignore SMS messages from the phone numbers listed below.
Incoming messages from these senders will be saved in the normal Messaging inbox.</string>
</resources>

View File

@ -56,11 +56,22 @@
<CheckBoxPreference
android:key="network_failover"
android:title="Network Failover"
android:title="Network failover"
android:summaryOff="Do nothing if phone can't connect to server via Wi-Fi"
android:summaryOn="Automatically switch to mobile data if phone can't connect to server via Wi-Fi"
></CheckBoxPreference>
<PreferenceScreen
android:key="ignored_numbers"
android:title="Ignored phones"
android:summary="Configure the phone numbers that EnvayaSMS will ignore"
>
<intent
android:action="android.intent.action.MAIN"
android:targetPackage="org.envaya.sms"
android:targetClass="org.envaya.sms.ui.IgnoredPhoneNumbers" />
</PreferenceScreen>
<CheckBoxPreference
android:key="test_mode"
android:title="Test mode"