Skip to content

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
warren-bank committed Oct 19, 2019
1 parent 28f8a3a commit ae709e9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Android app that listens for incoming SMS text messages and conditionally sends
* `ADD` ActionBar menu item:
* adds new rule to whitelist
* whitelist rules are compared to all incoming SMS text messages:
* `Sender`:
* `Sender must end with`:
* this value specifies a phone number (without any punctuation)
* a match occurs when the sender of the SMS message is equal to this exact value
* a match occurs when the _sender_ of the SMS message ends with this exact value
* `Message must begin with`:
* this value contains any arbitrary string
* a match occurs when the body of the SMS message begins with this exact value
* a match occurs when the _body_ of the SMS message begins with this exact value
* whitelist rules can be modified
* clicking on an existing rule opens a dialog with options to:
* edit and save changes
Expand Down Expand Up @@ -75,6 +75,22 @@ Android app that listens for incoming SMS text messages and conditionally sends
* minimum supported version of Android:
* Android 3.0 (API level 11)

#### Version Changelog:

* `v1.1.0`
* Preference `Sender` changed to `Sender must end with`
* in `v1.0.0`:
* exact match
* in `v1.1.0`:
* value entered in whitelist rule only needs to occur at the end of the SMS `sender`
* the purpose for this change is to ignore optional country codes, and such
* example:
* rule: `9876543210`
* SMS sender: `+19876543210`
* is match?:
* `v1.0.0`: _no_
* `v1.1.0`: _yes_

#### Legal:

* copyright: [Warren Bank](https://github.com/warren-bank)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static boolean matches(ArrayList<ListItem> arrayList, String sender, Stri
item = arrayList.get(i);

// required
if (!item.sender.equals(sender))
if (!sender.endsWith(item.sender))
continue;

prefix_length = item.message_prefix.length();
Expand All @@ -56,7 +56,7 @@ public static boolean matches(ArrayList<ListItem> arrayList, String sender, Stri

prefix = message.substring(0, prefix_length);

if (item.message_prefix.equals(prefix))
if (prefix.equals(item.message_prefix))
return true;
}
catch(Exception e) { continue; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<string name="app_name">SMS my GPS</string>

<string name="label_enable">Enable Service</string>
<string name="label_sender">Sender:</string>
<string name="label_sender">Sender must end with:</string>
<string name="label_message">Message must begin with:</string>
<string name="label_button_cancel">CANCEL</string>
<string name="label_button_delete">DELETE</string>
Expand Down
4 changes: 2 additions & 2 deletions android-studio-project/constants.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project.ext {
releaseVersionCode = Integer.parseInt("001000011", 10)
releaseVersion = '001.00.00-11API'
releaseVersionCode = Integer.parseInt("001010011", 10)
releaseVersion = '001.01.00-11API'
minSdkVersion = 11
targetSdkVersion = 28
compileSdkVersion = 28
Expand Down

0 comments on commit ae709e9

Please sign in to comment.