{"id":572,"date":"2016-01-25T09:14:01","date_gmt":"2016-01-25T14:14:01","guid":{"rendered":"https:\/\/fieldscience.cs.earlham.edu\/?p=572"},"modified":"2016-01-25T09:14:01","modified_gmt":"2016-01-25T14:14:01","slug":"back-to-android-and-sqlite","status":"publish","type":"post","link":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/","title":{"rendered":"Back to Android and SQLite"},"content":{"rendered":"<p>Since the beginning of the semester, I&#8217;ve been working on Field Day again and somewhat sorting out git. At the end of last semester, we were having trouble with git and we&#8217;re still trying to figure that out. We&#8217;ve decided that we&#8217;re all going to stick on the same Android Studio version and upgrade at times we decide as a group. Nic has the most updated version 1.5, so we&#8217;re all going to stick to that.<\/p>\n<p>The latest code push was code that broke my Field Day setup, so all of the code I&#8217;ve been working on hasn&#8217;t been pushed yet. I&#8217;ve started a new branch of our git repo called SQLite work that I&#8217;ve been committing my changes to. As a result, I&#8217;ve been learning a lot of git and branching and I think this may be the way to do so we don&#8217;t end up with broken code in our &#8216;master&#8217; branch.<\/p>\n<p>The part of Field Day I&#8217;ve been working on is the SQLite database. Previously, we wrote all of our readings to a CSV file but that gets quite messy. So, in this new application we&#8217;ve decided to go to SQLite. I&#8217;ve written a class called ReadingsDatabase which is a SQLiteOpenHelper class. This is used to create, delete, upgrade, update, query, etc the database. I&#8217;ve also written an interface that will be used to communicate between the Sensor Fragment classes and the main activity. I&#8217;ve been using the &#8216;Built-In Sensors&#8217; fragment to test because we haven&#8217;t created any of the other sensors to test yet. I\u00a0believe it is working, but the problem I&#8217;m running into is the class is writing to the database too quickly which is causing the primary keys I&#8217;ve set up to fail. I&#8217;m looking into a way to slow down the writing to the database. Once we figure out the git problem, I&#8217;m going to push my code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since the beginning of the semester, I&#8217;ve been working on Field Day again and somewhat sorting out git. At the end of last semester, we were having trouble with git and we&#8217;re still trying to figure that out. We&#8217;ve decided &hellip; <a href=\"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"kt_blocks_editor_width":"","footnotes":""},"categories":[1,11],"tags":[15,27,14,16,51],"class_list":["post-572","post","type-post","status-publish","format-standard","hentry","category-kristin","category-progress-reports","tag-android","tag-application","tag-design","tag-development","tag-software-architecture"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Back to Android and SQLite - fieldscience @ earlham<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Back to Android and SQLite - fieldscience @ earlham\" \/>\n<meta property=\"og:description\" content=\"Since the beginning of the semester, I&#8217;ve been working on Field Day again and somewhat sorting out git. At the end of last semester, we were having trouble with git and we&#8217;re still trying to figure that out. We&#8217;ve decided &hellip; Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/\" \/>\n<meta property=\"og:site_name\" content=\"fieldscience @ earlham\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-25T14:14:01+00:00\" \/>\n<meta name=\"author\" content=\"Kristin Muterspaw\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kristin Muterspaw\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2016\\\/01\\\/back-to-android-and-sqlite\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2016\\\/01\\\/back-to-android-and-sqlite\\\/\"},\"author\":{\"name\":\"Kristin Muterspaw\",\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/#\\\/schema\\\/person\\\/2559340425ea97e18ee79c40f3365222\"},\"headline\":\"Back to Android and SQLite\",\"datePublished\":\"2016-01-25T14:14:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2016\\\/01\\\/back-to-android-and-sqlite\\\/\"},\"wordCount\":341,\"commentCount\":0,\"keywords\":[\"android\",\"application\",\"design\",\"development\",\"software architecture\"],\"articleSection\":[\"Kristin\",\"Progress Reports\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2016\\\/01\\\/back-to-android-and-sqlite\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2016\\\/01\\\/back-to-android-and-sqlite\\\/\",\"url\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2016\\\/01\\\/back-to-android-and-sqlite\\\/\",\"name\":\"Back to Android and SQLite - fieldscience @ earlham\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/#website\"},\"datePublished\":\"2016-01-25T14:14:01+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/#\\\/schema\\\/person\\\/2559340425ea97e18ee79c40f3365222\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2016\\\/01\\\/back-to-android-and-sqlite\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2016\\\/01\\\/back-to-android-and-sqlite\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2016\\\/01\\\/back-to-android-and-sqlite\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Back to Android and SQLite\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/#website\",\"url\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/\",\"name\":\"fieldscience @ earlham\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/#\\\/schema\\\/person\\\/2559340425ea97e18ee79c40f3365222\",\"name\":\"Kristin Muterspaw\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e7c298ecf2dd418cede9d8bbea149b1fd9aa9135a540aef28db205ac8749c8f2?s=96&d=wavatar&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e7c298ecf2dd418cede9d8bbea149b1fd9aa9135a540aef28db205ac8749c8f2?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e7c298ecf2dd418cede9d8bbea149b1fd9aa9135a540aef28db205ac8749c8f2?s=96&d=wavatar&r=g\",\"caption\":\"Kristin Muterspaw\"},\"url\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/author\\\/kmmuterspaw\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Back to Android and SQLite - fieldscience @ earlham","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/","og_locale":"en_US","og_type":"article","og_title":"Back to Android and SQLite - fieldscience @ earlham","og_description":"Since the beginning of the semester, I&#8217;ve been working on Field Day again and somewhat sorting out git. At the end of last semester, we were having trouble with git and we&#8217;re still trying to figure that out. We&#8217;ve decided &hellip; Read More","og_url":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/","og_site_name":"fieldscience @ earlham","article_published_time":"2016-01-25T14:14:01+00:00","author":"Kristin Muterspaw","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kristin Muterspaw","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/#article","isPartOf":{"@id":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/"},"author":{"name":"Kristin Muterspaw","@id":"https:\/\/fieldscience.cs.earlham.edu\/#\/schema\/person\/2559340425ea97e18ee79c40f3365222"},"headline":"Back to Android and SQLite","datePublished":"2016-01-25T14:14:01+00:00","mainEntityOfPage":{"@id":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/"},"wordCount":341,"commentCount":0,"keywords":["android","application","design","development","software architecture"],"articleSection":["Kristin","Progress Reports"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/","url":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/","name":"Back to Android and SQLite - fieldscience @ earlham","isPartOf":{"@id":"https:\/\/fieldscience.cs.earlham.edu\/#website"},"datePublished":"2016-01-25T14:14:01+00:00","author":{"@id":"https:\/\/fieldscience.cs.earlham.edu\/#\/schema\/person\/2559340425ea97e18ee79c40f3365222"},"breadcrumb":{"@id":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2016\/01\/back-to-android-and-sqlite\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fieldscience.cs.earlham.edu\/"},{"@type":"ListItem","position":2,"name":"Back to Android and SQLite"}]},{"@type":"WebSite","@id":"https:\/\/fieldscience.cs.earlham.edu\/#website","url":"https:\/\/fieldscience.cs.earlham.edu\/","name":"fieldscience @ earlham","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fieldscience.cs.earlham.edu\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/fieldscience.cs.earlham.edu\/#\/schema\/person\/2559340425ea97e18ee79c40f3365222","name":"Kristin Muterspaw","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e7c298ecf2dd418cede9d8bbea149b1fd9aa9135a540aef28db205ac8749c8f2?s=96&d=wavatar&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e7c298ecf2dd418cede9d8bbea149b1fd9aa9135a540aef28db205ac8749c8f2?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e7c298ecf2dd418cede9d8bbea149b1fd9aa9135a540aef28db205ac8749c8f2?s=96&d=wavatar&r=g","caption":"Kristin Muterspaw"},"url":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/author\/kmmuterspaw\/"}]}},"_links":{"self":[{"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/posts\/572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/comments?post=572"}],"version-history":[{"count":1,"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/posts\/572\/revisions"}],"predecessor-version":[{"id":573,"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/posts\/572\/revisions\/573"}],"wp:attachment":[{"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/media?parent=572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/categories?post=572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/tags?post=572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}