Names: Simon Wong, Sayali Kakade Github IDs: thatonesimon, sayalirkakade
(a) This program allows you to send an SMS to an Android device and have that device execute tasks based on the message that was sent.
(b) A set of user stories:
- As a user, I can text my phone //Location to have my phone text me back with GPS coordinates.
- As a user, I can test my phone //Contact [name] to have my phone text me back with the stored contact info of anyone who fully or partially matches [name].
- As a user, I can text my phone //Battery to have my phone text me back with the battery percentage and charging state.
- As a user, I can text my phone //Calls to have my phone text me back with a log of missed calls.
- As a user, I can text my phone //Ring to have my phone ring for a while.
- As a user, I can text my phone //Help to have my phone text me back with a list of all possible functions.
- As a user, I can text my phone //SMS [number] m:[message] to have my phone send an SMS to [number] saying [message].
- As a user, I can text my phone //Joke to have my phone text me back with a joke that is in the database.
- As a user, I can text my phone //Wifi to have my phone text me back with whether or not Wifi is enabled.
- As a user, I can text my phone //Bluetooth to have my phone text me back with whether or not the Bluetooth is enabled.
- As a user, I can add numbers to the whitelist to allow them to access the commands of this application.
- As a user, I can toggle settings to choose which functions I want the application to use.
(c) This application runs. After opening it on your android device, it runs in the background, waiting from an SMS from a number on the whitelist. If you get an SMS from a number on the whitelist, it will see what the SMS is, and if the SMS matches a pre-determined command, the application will execute the corresponding function. The user can add and remove numbers off the whitelist, and toggle on or off functions.
(d)
- As a user, I can specify which functions are allowed to be used by each number on the whitelist, to prevent abuse of the application's features.
- As a user, I can text my phone //Powersave to have my phone disable Wifi, Bluetooth, and/or Mobile Data.
- As a user, I can text my phone //Snap to have my phone take a picture using the front-facing camera, and send it to me through SMS.
- As a user, I can text my phone //ScreenSnap to have my phone take a screenshop, and send it to me through SMS.
(e) The READ.md currently features the project objectives, implemented methods, ideas for improvement, and user stories. The file thoroughly describes all the different functionality of the application and even provides good tips for things that could be implemented next. It tells the user of the different commands that they can send to a phone in order to execute various tasks. The user stories part was a little bit confusing because the functionality was already outlined in the implemented methods section and it was confusing to know what actually works and what doesn’t without running the app since some of the user stories are crossed out and this could mean different things. Additionally, the file doesn’t provide any information on compiling or running the program on an android device, so first time android developers might be confused as to how to get started with this project. Information about compiling and running the program and what to expect when the program runs should be included to make it easier for the next generation.
(f) Instead of a build.xml file, there is a build.gradle file. There is a build.gradle file in the main directory and another build.gradle file under the app directory. The build.gradle file in the main directory is a top-level buildfile. The configurations that are common for all the subdirectories are added here. In the .idea folder, there are also .xml files that take care of different parts of the project, such as main.xml and gradle.xml. Looking through all the .xml and build.gradle files, all of the functions of the build.xml file seem to be covered.
(g) There are currently ten open issues. The total points fixing all of these issues 1400, which is more than enough to reach our 1000 goal (750, if we include 250 for this assignment).
- One issue we are interested is adding a RemindMe feature (200 pts), where you text the phone //RemindMe [date] [time] [message], and the phone will create a calender event based on the specifications.
- Another issue we want to work on is making commands less strict (100 pts). This gives the user a little bit of wiggle room when typing commands.
- Another issue we want to work on is fixing the Ring function (100 pts) by making the phone ring for a specified amount of time, or making the ringing stop immediately with user interaction with the android device.
- One other issue we want to work on is adding a Powersave function (50 pts), where we can text our device //Powersave in order to switch off phone features to save battery.
- Another issue to work on is tuning the Location function (150 pts), where we access GPS coordiates through a different method. We can also restrict the amount of time this function can run, to make sure that if GPS coordinates aren't able to be found, we end the function so prevent battery drainage.
- Another issue we can fix is implementing a Snap function (200-300 pts), where we allow users to text //Snap to the android device, and have the device take a picture with the front-facing camera, and forward it to the user.
All of these issues have pretty clear descriptions, and total up to more than enough points!
(i) The two main parts of this project reside in the .java and .xml files. There are 5 .java files, which handle the operation of the application (back-end), and 3 .xml files, which handle the layout of the application (front-end).
The 3 .xml files designate the layout of the 3 screens that this app uses.
- Starting with activity_main, we see that the main screen consists of two buttons and a text field. Pressing the "Settings" button takes you to the settings screen (settings_main.xml) and pressing the "Whitelist" button takes you to the whitelist screen (whitelist_main.xml).
- In the settings screen, there are a series of Switches that allows the user to toggle on and off the features of the application. There are also two text fields that give a little description of the page, and its usage.
- In the whitelist screen, there are two text edit fields, with corresponding buttons that allow the user to enter numbers into the "whitelist", which enables those numbers to access the functions of the application. The saved numbers are shown in a text field.
The 5 .java files handle the execution of the application's functions.
- In the MainActivity class, we see that the two buttons are given their functions.
- In the MainService class, the application recieves SMS's, and decides whether or not a text recieved is from a number on the whitelist. If so, it fowards information to SMSRequestManager.
- In the SMSRequestManager class, we see the bulk of the code. This is the class responsible for executing a particular function, based on texts recieved.
- In the Settings class, the code handles the toggling of settings, ensures that settings are saved, and displays messages whenever the user toggles a setting.
- In the Whitelist class, all functions related to adding/removing numbers from the whitelist are handled. It also implements a function that handles reading through the whitelisted numbers.
(j) There are no JUnit tests. Android Studio uses a separate debugging tool. The only class that we could find that runs testing on the application is the ApplicationTest.java file in the src/androidTest sub directory. The ApplicationTest class imports the android.app.ApplicationTestCase library and simply uses a call to super() in the constructor. Looking on the Android Studio website for the ApplicationTestCase documentation, it says this class was depreceated in API level 24, so it’s something that we will have to replace with the InstrumentationRegistry class. The constructor of this class simply returns the application for testing.