Mobile
Desert Code Camp Tomorrow!
May 14th
I’ll be presenting “Introduction to Android Development” and “ASP.NET MVC2 with the Spark View Engine”. Sign up for yopur sessions here: http://www.desertcodecamp.com
If you’re in the area, I hope to see ya there!
Android: Odd Error in DefaultHttpClient
Apr 29th
I’m working on a couple of projects that interact with REST api’s and consume JSON data and in doing so I use the DefaultHttpClient from apache, located in the Android framework.
The Error
Last night I was working on a project and kept getting this error:
java.lang.IllegalStateException: Target host must not be null, or set in parameters.
I spent about 20 minutes banging my head against the wall, inspecting through the debugger, googling, etc. Long story short, there was not much info out there on how to fix this error. I found out what it was after another 20 minutes banging my head against the keyboard.
The Issue
I was connecting to website with the following URI:
www.example.org/api/json/get_stuff
The problem is that I was missing the “http://”. Therefore it should have been:
http://www.example.org/api/json/get_stuff
This fixed the issue. The reason is that the scheme was not provided in the URI. As soon as this was changed the entire client worked as expected.
Normally I wouldn’t blog this, but this is one of those issues where if I can’t find the resolution to the issue, I might as well blog it so others can find it when they run into it.
Android: Escaping Strings in Eclipse
Apr 27th
I’m in the middle of writing some unit tests (jUnit) and I’m testing that my parsing/etc is working correctly from a JSON data source. However, this HUGE JSON data structure needs to be escaped. I was spending about an hour escaping this complex JSON string until I said “screw it, there has to be a better way” and then I started poking around in the editor preferences. Eclipse supports escaping strings for you. Here’s where you set this setting:
Preferences/Java/Editor/Typing/ "Escape text when pasting into a string literal"
Here’s a screen shot of it. I hope this helps anyone else who’s doing this because I lost a couple of hours just because I didn’t know the option existed (and because its buried).
Intro to Android Development Materials
Apr 10th
I just gave my talk at the Twin Cities Code Camp. Thank you for coming out!
Below you will find the materials from today’s talk:
Code (on GitHub)
Presentation (on SlideShare)
Twin Cities Code Camp 8
Apr 4th
The 8th Twin Cities Code Camp is this weekend (April 10, 2010). I’ll be giving a talk on getting started with Android Development. If you’re interested in developing for Android, this session is for you! Here’s some more info:
Session Abstract
In this session, Donn will delve into the basic requirements for you to get started with Android development. We will cover the architecture of the Android operating system as well as some ins-and-outs of Android mobile development. Starting with the basic install (Eclipse and Android SDK) an actual Android Application will be created during this session that will be published to the Android Marketplace in real time. A general understanding of the Java language is advised but not required.
Here’s a little teaser of the app we’ll be building (click for larger view):
See you there!


