Around the same time I started using RFO Basic, I began to use something called App Inventor. This was originally a project developed by Google, but they eventually set it free and it was picked up by the MIT Center for Mobile Learning. This is a web-based programming environment and it is designed to be used by someone with limited programming experience. I first heard about this at a science fair in early 2012 when one of the projects I was judging was based on using App Inventor to develop a computer game. The system looked interesting, but it seemed to be set up for very simple game programming, so between that and the fact that I didn't have a phone to program, I didn't really follow up on it. At the end of 2012, I found out a colleague at CSU was using App Inventor for research apps, so I went to the site to learn more about it. The system is pretty straightforward: you move around "blocks" that correspond to variables and the commands that you want the phone to carry out. The user interface and block programming are all drag-and-drop so it's easy to learn and get it working pretty quickly. The blocks shown below are used to take information from the GPS and update the display of latitude, longitude, and GPS accuracy on the screen. This would take a lot more programming in the other systems I've used to program Android, so this demonstrates that you can do some pretty impressive stuff in App Inventor with a minimal amount of effort.
Another huge benefit of App Inventor is the excellent series of tutorials that are available through their website, which walk you through a lot of the complexities of programming very clearly. There are some items that are not covered, but overall you can get up and running in a short amount of time. One of the first apps I developed determines if a particular population is in Hardy-Weinberg equilibrium based on the genotypes of the population. This is a pretty common type of test to use in my intro biology for majors and evolution classes, so it was nice to have a quick way to check some numbers without having to worry about making a math error or opening up my computer to plug the numbers into a spreadsheet.
I've already developed several apps using this system for use in my research. The first app allows me to store a location along with it's GPS coordinates and some notes describing the location. This is an important tool for field research in general, but it's especially useful with working with nocturnal animals, since you can visit the same location in the day time and have no idea that you're in the same place! This app can also take your current location and calculate the distance and bearing to a particular site, search for the closest stored site based on your current location and even point the way with an arrow on the screen so I know which way to travel and how far I have to go. This is very helpful when you are in the general vicinity but aren't 100% sure of exactly where that research site is located. This app has a number of ways to store the data, including on the phone, to a web data base, to a Google Fusion Table (a type of document available through Google Drive, which can map the locations on Google Maps in addition to other capabilities), or to a text file on the SD card for use by other programs. This last option requires a second program that was written in Eclipse, which I describe in more detail below.
A second app stores a record of the path you travel, by storing your GPS coordinates every time you move a certain distance. This allows you to document the path you followed and the distance you traveled. This is useful for research involving transects, where the researcher has to travel a certain path which can sometimes be quite long. This app can save the data in a variety of ways, but I found one major problem with saving data to Google's Fusion Tables. The app defaults to saving a data point every 20 meters but even if that is increased, on a long trip, you can generate several hundred points. When I tried to upload the data to the Fusion Table, it would manage to upload some of it, but eventually fail and give an error of some sort. For the previous app this hadn't been a problem, but I had never saved more than a handful of points at a time. I eventually gave up on saving directly to the Fusion Table, and instead save the data to a text file on the SD card in a format that can be imported into the Fusion Table. The app also allows you to re-trace your path displaying an arrow directing you along the path, towards the nearest stored point, etc. This image shows a small number of points saved on a stroll on campus. The app can add a note to the points so that they are displayed differently. These points were uploaded to the Fusion Table and displayed through its default mapping capability with green ones indicating that a note was added while the red ones indicate that no note was added. No extra programming was required to make this display beyond the programming of the app itself.
A third app I recently completed is one to estimate the height of objects. This is useful because when studying flying animals, it can be helpful to have some idea of how high the bats are. Bat echolocation calls fade rapidly with distance, so the height of the bats can affect the type and quality of the sounds that you can record. Instead of trying to estimate the heights myself (which I suspect is very inaccurate) it uses basic trigonometry to determine the height. You start directly underneath the height you need to measure (e.g., where the bats are flying) and then walk some distance away. The app calculates how far you have walked based on the GPS unit in the phone as well as making an estimate using the accelerometer of the phone to count the number of steps you've taken from the starting point (this works like a pedometer, which requires you to have an estimate of your stride length). You can also enter the distance directly into the app in case you already know how far you are from the location. You then point the phone to the height you are trying to estimate and click the calculator button. At this point, the app calculates the height based on the angle of the phone and the distance you have walked. The theory is pretty simple (and it's been in use for as long as trigonometry has existed) but it's nice to have the phone do all the calculations so that I can just record the data! One thing you'll note is that the GPS and accelerometer measurement of distance are different, which means the height calculations are different as well. This could be for a variety of reasons, but one of the major ones is the accuracy of the GPS, which can vary a lot depending on your situation. For that reason, the app displays the accuracy of the GPS (the number is listed after the GPS coordinates) so that you can take that into consideration as that can sometimes make significant difference in the height that the app calculates. The app also takes into account any changes in altitude as you walk and the user's own height to give a more accurate value. Even with the variability that you can find, this estimate is one I have more confidence in than my own guess as to how high something is, so the data should be taken with a grain of salt, but they do provide a good starting point and it spares me having to measure out my walking distance and getting an inclinometer to measure the angle for me, so it's faster and simpler to use and it's accurate enough for my needs.