This week we implemented sending text messages from the FONA. The Arduino communicates over Serial lines to ask the FONA for all the relevant info, converts that info into a string containing a JSON object, then sends the string back to the FONA over Serial and asks it to send it to the user. We also implemented geofencing on the FONA. We set it up to tell the Arduino a lock location when it receives a lock command, then the Arduino uses spherical trigonometry to compare its current location to the initial location. When it is over 50 meters away, it tells the FONA to send a text to the user.
This week we set up a background service to listen for text messages in our app. We also set up an AppForeground checker to allow the app to know when to parse or ignore messages. The app converts the incoming texts into JSON objects and attempts to parse out various variables. We configured the text message listener to create a notification channel and notify the user if the module sends a message saying that it is over 50 meters away from the lock location. Additionally, we set up the Google Maps fragment with various animations such as zooming in on the user and following them.
This week we got the Google Maps API working in our app to display both the user's location and a separate location of the device. We also set up a GPSTracker class in Android to hold all the info of the device. Also, we set up the the Arduino to FONA interface and began programming the FONA to send its GPS info over GSM.
This week we began programming the app by integrating a maps fragment and maps activity. We drew mock UIs and planned all the features. Planned features involve pinging the module to receive a location, geofencing the module, and allowing the module to play a sound when prompted via GSM. Additionally we planned out and ordered all the materials necessary for the prototype and set up our Github repository.