Android for dayz

with No Comments

After having all of the logistics completed, I was able to get back to Android development. I am still working on the sqlite database implementation in Field Day. After some research, I determined that the best method for implementing a thread is by the use of Handler and Runnable objects. Before implementing this method, the Field Day was writing to the sqlite database too often causing the primary keys I’ve chosen to fail. I implemented the UI option from Seshat of selecting how often the sensor values are logged. The Handler object basically just has the runnable ‘run’ every number of seconds that is chosen by the user. Inside the runnable function, the SensorSampleActivity goes to the interface for communication between the sensor Fragment and Activity to grab the list of sensors and adds appropriate metadata (geocode, accuracy, satellites, etc). and writes it to the database. I think it is working, but I still need to do some more testing. I have to get the database off the Nexus (not particularly easy) and examine the contents.

Leave a Reply