Week Six

Last week we ended with trying to set up phpMyAdmin with our Android application. We didn’t get very far on this, but luckily Kay had given us a tutorial on how to create a sync adapter in our application. I began reading through the tutorial before our 10 o’clock meeting met Majdah. Shortly after I begun reading I realized that I had to rewrite my SQLite database. After the meeting, Aislinn and I decided to split up the tasks. Aislinn decided to focus on developing the alarm algorithm, while I decided to work on the sync adapter. My goal was to have at least half of the code written by the end of the day. So I got to work. I was able to write all of the Java files using the tutorial by dinner time. This weren’t too difficult to write, but get confusing at times. Then I took a break for dinner. It was Nigel’s birthday so we all went out for hibachi food. The food was good, and it was nice to socialize with everyone for a while. After dinner Ayush, one of the students in SROC, offered to help explain how phpMyAdmin worked. He was able to show me how the importing php scripts onto the server would work. I was very thankful for his help, and hoped I could begin on the second half of the sync adapter on Tuesday.

Tuesday I had a general idea of how I was supposed to connect the Android application to phpMyAdmin. I knew that I had to run the PHP scripts from a server, and use the PHP PDO_construct function to create a connection. Unfortunately, I wasn’t sure what server I should be using. The phpMyAdmin had a server it was running, but this wasn’t what I needed. So I emailed Professor Connelly asking about the server, and began doing research on how this connection works. I found some tutorials, but nothing I found was very helpful. Most tutorials were more about how to run PHP scripts locally. After the a morning of little progress, I decided I would be much more productive working on the ProHealth deliverables. I spent the rest of my day doing this.

Wednesday was a busy day. Asilinn and I had a meeting with Majdah, professional pictures, and a ProHealth seminar. Before we began all that, we were able to talk to Professor Siek about the server. We needed to use the CGI server, which we didn’t have access to. Luckily Majdah did, and we were able to write simple Hello World script in a matter of minutes. Once this was working I started writing a connection.php script that included a constants.php scripts. These scripts created a connection to our project’s phpMyAdmin page. Once these were up and running, I was able to begin writing the sync.php script. This would be the script that would be called from our Android application. Unfortunately, half way through writing this script my terminal had timed out. I wasn’t able to work much more on this, so instead I went home and tested the sync adapter in our application after dinner.

Aislinn and I began the day by making a to do list of everything that needed to be done. We quickly finished editing our paper, making agendas, and reviewing some code we had both written on our own. Then we decided to work on the alarms together. This was Aislinn’s task for the week, but she asked if I would help her fix somethings. After some testing we found that something wasn’t happening correctly in our Manifest file. We have our application written so the alarm receiver was extended the broadcast receiver class. This was so the alarm could go off even when the application was running, but after testing the alarms were just never going off. We needed to do some more testing to find the cause of this problem. After that was finished, I began working on the PHP scripts and sync adapter some more. I began by slowly writing and testing my PHP scripts. There were about five necessary scripts for the sync.php script. Although writing these took some time, I was confident that they were working properly by the end of the day.


It was another great week working on our application. Although at times it seemed like we were making less project than the week before, we were doing much more challenging tasks. This week we were using different tools, and writing in different languages. Also, there were little resources online that we found helpful. Luckily, we are well on our way to completing the alarms and sync adapter. They may not be finished this morning, but we have to have them finished very soon.

Here are a few other things from this week: