Tuesday, June 28, 2011

Quick Update Before Vacation

Well, technically, vacation started today, but since most of the day was spent taking care of other necessary items and a lot of home searching, I figured why not throw a little coding in as well. I updated my most recent app, MyCallReminder, today. I added a couple new items as well as did some clean up and re-labeling.

As my last post said, this app is for a buddy of mine. Once I had the initial build put together, I quickly got some feedback on some tweaks that would be beneficial. There weren't many and each idea seemed like a good idea so I immediately got to work stubbing out the placeholders for the additional code.

After reviewing the ideas a few times, I was able to work off a very short list. Initially, my list was only to add 2 additional reminders as well as possibly throw the word "Sales" into the mix somewhere. The reminders were very straight forward, in terms of the request. Working "Sales" in though was only a side comment and not really one specifically requested for this update. However, after more testing and playing around with the app myself, I came up with a short bug list and a couple places where readability improvements could be made. Finally, my list was comprised of only a few items:
1. Re-Label everything to include the word "Sales" (Except the App name on the Android Market).
2. Add leading 0's to all date/time text strings where necessary(Days and Minutes)
3. Manage the data entry keyboard when entering a phone number (Should show the numeric keyboard)
4. Add 2 additional reminders with static offsets.

Items 1,2 and 3 were relatively quick fixes. I pretty much found every place where I was using "MyCallReminder" or "My Call Reminder" and added the word "Sales" before "Call" to resolve the labeling issue. For the leading 0's, a little extra code was added to check for Day and Minute values that were less than 10 and added a preceding '0' to the text displays of the alarms. (This only affected the user's readability of the date/time values). Finally, I located the property on the TextView object to force the value to be a Phone Number. This causes the Android OS to appropriately display the numeric keyboard when the user clicks on the Phone Number TextView for data entry.

The fourth item, adding 2 additional reminders, turned out to be a little harder than I originally anticipated. I should have known better; Things are always problematic when working with Dates/Times. In the initial release, there wasn't much code around the date/time of the reminder. Any conversion from text<=>date was done at a single spot in the code and was only for retrieving reminders from the app's local database. This change brought the requirement of managing the date/time to the main activity and was no longer as relevant as part of the data helper class. I needed to convert my date/time values into a type that allowed me to add either days (in 1,2 or 3 week increments) or months (in 1,2,3,6 or 12 month increments). Thanks to the Simple Date Format I was able to get there and without much issue. At first, I attempted to use a straight "Date" object, but found it to be very limiting in Java. I then used the Simple Date Format to get a Calendar Object, assuming the format string I previously decided to work with, and then used the Date Object to populate the Calendar Object. The Calendar object was then used to add either days/months to the date for the other reminders.

I was able to do some testing and between screwing with my phone's date/time settings as well as using the logcat output, I was able to verify the functionality enough. I am suspect there are still a couple bugs, but am waiting for more feedback before moving forward anymore. As I stated originally, I am on vacation so I am not sure if I will get my code cleaned/posted this/next week or not. I am trying to stay off the computer as much as possible. My mind continues to identify other areas of improvements so I may end up adding some new features/tweaks before I get anything posted, but we will have to see. I have a lot of family time planned and am really looking forward to disconnecting from the digital world for a couple weeks.

1 comment:

  1. The app is great, mate. Can't wait till it gets all dolled up.