Wednesday, January 5, 2011

First Look at Android Development



Release Date
I don't have an app released yet, and I didn't even come close to my January 3rd deadline.  I was planning on spending a good portion of my vacation getting some coding done, but on Christmas day, I woke up with the flu (Merry Christmas!).  I spent 4 solid days in bed, and probably spent more time in the bathroom than I did sleeping each of those days.  If you have ever seen dumb and dumber, it was kind of like that, but there wasn't a trip to Colorado involved :P  I was ill.  I could barely do anything.  It took me a week before I could even eat solid foods for an entire day.  It was rough, but that is over, and now I am on to a development a little at a time.  The release date is now moved to TBA :)


Emulator Bluetooth Support
I was a little disappointed that the Android emulator doesn't have bluetooth support out of the box.  While you can create an Android 2.3 AVD (android virtual device), I was targeting the 2.2 since my HTC EVO is still on 2.2.


As you can see above, the Android 2.2 emulator has bluetooth is disabled (grayed out) by default.  On the android developer website, it states under the limitations of the emulator, "No bluetooth support."  Since I am writing an app that interfaces with bluetooth, this might pose some testing difficulties.  Hopefully, the bluetooth stack is pretty vanilla across devices.

Once I figured that out that bluetooth wasn't supported, I thought I would just use my HTC EVO, but then I realized that I didn't have the ADB USB drivers.  After a little searching, I found many crazy posts claiming to install motorola drivers with around 10 or so steps to do so, but in actuality you only need to install HTC Sync from HTC's website.  On another note, I really kind of wish I would have went with the Nexus S or the Nexus 1 without any proprietary UI installed.  Android was really raw on the Tmobile G1, but it was pretty clean too.  

Coding Progress
As of now, I coded an app to talk from my phone to another bluetooth device.  The other bluetooth device transmits a message (every second or so) that I decode in my app.  So far I have had pretty good success decoding the message, but I have some anomalies in the data every once in a while.  It looks like the SDK (for the "other" bluetooth device) is incomplete so I need to contact the manufacturer to get some more details.  I was essentially logging everything to logCat (the logging api for android) which is pretty sweet.

My code structure needs some work.  It is all a clunky hello bluetooth world right now.  I will divide it out.  My next steps in development:
  • Design and implement a simple UI to display the data
  • Put the bluetooth code into a service
  • Figure out how to get the data from the bluetooth thread to the ui thread

Random Notes
  • I just purchased my first Android tablet, the Archos 70 (8GB variety), from Newegg.  I haven't received it yet, but I am really excited to use it as an e-reader.  I need to read more.  Maybe I will give a little review of it in my next post.  It was only $274 which is almost half of what the cheapest iPad costs. 

  • My goal is at least one post a week (with the exception of last week due to illness and holidays).
  • Follow me on twitter @keperry (also if you know of some interesting people to follow, let me know)





2 comments:

  1. This is one of the well organized post.By using Android application you can get advance function.
    Android app developers

    ReplyDelete
  2. I heard the suggestion to call my credit card company and ask for a lower rate. I had thought that would never work, but it really does! I couldn’t believe how easy it was.

    ReplyDelete