Tuesday, May 4, 2010

WattDroid User Interface Improvements

The user interface is an important part of all applications. This is the part of the application that a user will interact with and ultimately decide whether an application is successful. It is possible to have an application that performs a useful task, but if the user interface is poorly designed, it will be unsuccessful.

The WattDroid application already performs a useful task by allowing users to access energy information from their phone. Currently, we are improving the application by incorporating threads. This will prevent the application from becoming unresponsive due to a slow server connection. The application will be able to continue functioning without waiting for the slow transaction to complete. Response time is a factor in the success of an application because no one wants to wait on a slow application. It is more likely they will not use the application than wait.

Implementing threading into an Android application is a tricky process. There are different ways to implement threading. Using multiple UI threads will allow you to run processes, but problems with thread interaction can arise while using this method. Fixing these issues can be time consuming. Asynchronous threads is another way to implement threads. This method solves many of the thread interaction problems encountered by the first method, but care must still be used to ensure the main thread, which is created when the Android application is first started, is not blocked. Initially, we implemented the threads using the first method, however, we are considering switching to asynchronous threading because of the problems that can arise while using multiple UI threads. Further information about threading Android applications can be found here. Additional information about using asynchronous threading can be found here.

Overall, I feel that we have made good progress with our application so far, but time is running short and we have a lot of work to do. There are still a few features that need to be implemented and the application requires polishing. After completing these improvements, our application will be more appealing and robust. I am hopeful that users will find the application useful and easy to use.

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.

Monday, March 29, 2010

New Applications

Finding an effective way to present data, so it is useful to consumers, can be a tricky problem. There are many different ways to present data and each has its pros and cons. We need to find effective ways to incorporate Oahu's electrical usage data and geographical locations. This information can be very useful if presented correctly.

One idea is to present the usage information and group it by areas. An image of the island would be displayed and segmented into different areas. Users would be able to access an area's information by clicking the appropriate section of the island. This will allow consumers to get a general idea of electrical usage by others in the same area and allow them to compare their own usage with the average. Then, they will be able to adjust their usage as they feel necessary.

Another idea is to group the usage information by zip code. This will give a more detailed view of the usage information pertaining to a consumer. They will be able to see the usage of others in their neighborhood. This will give them a better idea of where they stand compared to their neighbors. As for the user interface, it may be better to have text input boxes or drop down menus for the zip codes because it may be difficult to produce an image of the island that is segmented by zip code.

The popularity of smart phones has introduced a new technology that can be used to reach users. Creating an application for smart phones seems like it would be an interesting and beneficial experience. Smart phones are basically a mini computer with phone capability. Also, users usually have their phones with them where ever they go which would allow them to use an application just about whenever they want. Currently, we are considering creating applications for the Apple iPhone and Google Android Phone.

Apple iPhone:


Google myTouch:

Tuesday, March 16, 2010

HEEP Visualization Data

Our prototypes are finally functional and display data that is stored in Google Spreadsheets. This was a huge step which allowed us to schedule a meeting with the Hawaii Energy Efficiency Program to show them our prototypes. The next step was to find actual data to populate the spreadsheet.

In order to have realistic looking visualizations, we needed to find actual numbers that correspond to the electricity used by appliances in each of the categories we cover. This turned out to be more difficult than I thought it would be. After getting into the research of the electrical characteristics of the various appliances, I began to notice that not all appliance specifications are standard. Some had the information that I required and some were very scarce. This led me to make assumptions to try to determine the data that we required. There were also a lot of unit conversions involved that made things more difficult. The data we have now is based on actual data from appliance specifications sheets, but I am hopeful that HEEP might already have the data we need to make our visualizations useful.

Here is a link to our spreadsheet.

Working on these visualizations has been an experience. It has allowed us to use our imaginations to design different visualizations. We have taken ideas and turned them into real prototypes. For the next milestone, I hope that HEEP becomes more involved in the design and requirements process, so we are not guessing about the data and what they want. This would make our job easier and increase the chances that they get the applications that they want.