Monday, April 26, 2010

WattDroid Improvements

Creating our WattDroid Android application has been a constant learning experience. Each step of the development process holds something new for us to learn. Although we are familiar with Java, there are specific ways to accomplish tasks which requires us to research these tasks. Fortunately, there are many good resources available to new developers. In an earlier blog, I provided links to some books that I found helpful. Although reading those books are good, I have found it is easier to learn by example. Here is a link to the source code for the example programs in "Beginning Android 2". This is a great place to look if you are having trouble getting started because there are many examples that show you how to perform different Android tasks.

Several improvements have been made to WattDroid. We added new features and started to improve the look of the application. A preferences menu is now available to the user. This is where the user is able to specify the WattDepot server URL that they would like to query. The first time WattDroid is run, a prompt asking the user for the server URL is shown. Once a URL is entered, it is stored as a user preference and WattDroid will automatically use this URL, unless the user changes it.

Preferences Menu





Server URL Prompt



The source list was styled to have an image as the background. To accomplish this, the main.xml file for the layout of the page had to be altered. A background referencing an image in the drawable directory was set in the linear layout tag. Other applications have had issues with the image not displaying properly while scrolling. If you are having these issues, check this link which gives an explanation of why it occurs and how to fix the problem.

Styled Source List



The next step for our application is implementing unit testing and automated project building using Hudson. This is important to ensure that changes we make to the project don't adversely affect previously written code. This will be another important aspect of Android development we will have to research and learn.

Monday, April 19, 2010

Application Styling

If you take a look at good Android applications, you will notice that they have something in common. They serve a useful purpose such as providing entertainment or information and are pleasing to look at. Styling applications is an important part of the development cycle. Making applications pleasing to the eye can greatly improve its appeal. So far, the WattDroid application serves a useful purpose, but its appearance is not eye catching.

Currently, we are working to improve the styling of the WattDroid application in order to improve its overall quality. Our plan to improve the style of the application includes creating a more appealing application by customizing the list of sources, source information display, menus, and logo. After we are finished, we hope to create an application that has the look and feel of a professionally developed application.

I haven't had experience styling Android applications, so I am currently researching the ins and outs of the process. It is useful to look at the styling of other applications to get ideas of what can be done. Initially, I have been having some difficulty with the styling, but I am confident that I will be able to greatly improve WattDroid's look with a little more research. I will be posting screen shots of the newly styled pages as I complete them. I hope to have a couple of pages completed by Thursday, so check back later this week for screen shots.

Monday, April 12, 2010

Enter WattDroid

The initial prototype of WattDroid has been created. WattDroid is an Android application that allows users to query a WattDepot server for Oahu Energy information. Users will be able to specify which server to query by entering a WattDepot server URL. Then, a list of sources is displayed to the user. These sources are sensors that collect energy data. To access a source's information, the user taps on the source name in the list. WattDroid displays the XML from the WattDepot server for the selected source on a new page. This allows users to access Oahu energy information whenever they want.

Shown below are screenshots of the WattDroid prototype.

Phone Home Screen


WattDroid's Home Screen


About Screen


Source List


Source Information


I think that we made decent progress on the development of this application over the past week. We will be incorporating GPS capability into this application, the ability for users to specify a server URL, and a refresh interval for querying a server. There are still a lot of bugs to be worked out and improvements to be made, but the basic functionality is there. I am looking forward to polishing this application to get it ready for distribution.

The project homepage with user guide, developer guide, and WattDroid source code can be found here.

Tuesday, April 6, 2010

Android Energy Application Development

Android is a mobile platform that is becoming extremely popular which is why we have chosen to create an Android application for our next project. I have wanted to learn about mobile development for a while and this presents a perfect opportunity. Android uses the Linux Kernel, OpenGL,and SQL. This makes Android very powerful and able to create many different applications. Android applications are programmed in Java, so if you are familiar with Java, you shouldn't have too much trouble creating your own Android applications after a bit of reading.

Starting this project, I had little knowledge about mobile development, so I needed to find good resources that would get me up to speed fairly quickly. After some research, we found the books "Hello Android" and "Beginnning Android 2". Both of these books are easy to read and break down programming for Android nicely. They walk the reader through the creation of several sample programs that illustrate key features of Android programming. This enables a developer to being developing their own applications fairly quickly.

Hello Android



Beginning Android 2



Another helpful resource that I have been using is the Android Developers website. Like the books, this site contains helpful examples which explain key concepts to the reader. Like all introductions to programming, there is a "Hello Android" program. I highly recommend doing the examples on the website. I have found that reading is important, however, nothing can beat learning by example. The Android API can also be found there under the reference tab. The Android Developers website can be found here.

We have decided that our next application will be a mobile energy application. The application will query the Wattdepot server, which holds Oahu energy data, and display requested information on an Android smart phone. This allows consumers with Android smart phones to get Oahu energy data whenever they want. Like our earlier applications, we hope that this application will help educate Oahu residents to make them smart consumers.