ucsb-cs56-projects / cs56-android-smoke-signals

-
GNU General Public License v3.0
1 stars 7 forks source link

Allow user to choose how to run commands #13

Open sayalirkakade opened 7 years ago

sayalirkakade commented 7 years ago

Instead of hard coding the commands, let the user choose what text will trigger which action so that the program is more flexible. Additionally, this could fix potential bugs where the user writes the command wrong. For example, when sending a message through the SMS command, the user must enter m: and a space after the [number] and before the [message]. However, if the user forgets the "m: ", their message is truncated and the start of the message is not send. There is also no error handling there to ensure that the user knows this might happen. Allowing the user to choose how to run commands would enable them to set the command names to what they want.

jimmylle commented 7 years ago

@sayalirkakade Can you explain how the user would choose what text will trigger what action? Will there be like an input where they can put the string that will trigger the action. What about the commands that take in an argument like "//Contact [name]"?

sayalirkakade commented 7 years ago

Yes, once the user creates an instance of the application, there will be a place in the settings where they can change the text that triggers the certain action. After saving it, whenever they send that text while the application is still running, the command will execute. This is more of an enhancement type idea for customization. To implement it, you would probably need a dynamic variable. With the commands that take in an argument, the user can't change the format of the argument, (for example, SMS will still require a 10 digit number followed by a message), but they can change the actual command from "SMS" to whatever they prefer.

jimmylle commented 7 years ago

F16 OK (200 pts)

seemantasaha commented 6 years ago

W18 OK. 200 points.