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:
@ -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">
|
38
res/layout/ignored_phone_numbers.xml
Executable file
38
res/layout/ignored_phone_numbers.xml
Executable 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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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"
|
||||
|
Reference in New Issue
Block a user