Saturday, August 29, 2009

Google Technology Users Group

Just a quick note that I presented on Android at the local Twin Cities Google Technology User's Group this past week. I had to cover material for about 2 hours worth of time. It was a great experience and all who attended I felt get a lot out of the presentation. It's great see interest in the Minneapolis/St. Paul area build around Android and having been working with the platform in some shape or form for close to the past year, I feel like I'm really starting to master it and enjoy sharing my experience with others.
If you are in need of a person to train or bring your development staff up to date on Android, please contact me and let me know.
I also have posted all of the code that I wrote that night for the meeting and all of my slides up on GitHiub. You can find it all here:
http://github.com/justingrammens/tcgtug

For more in formation on the TCGTUG, you can find their website here:
http://tc-gtug.org/

Monday, July 6, 2009

POST JSON from Android using HttpClient

I'm using Ruby on Rails on the server and needed to post JSON to it from Android. Here's some quick code that I wrote to do this. Hopefully it helps someone else. All of the tutorials that I found didn't work. You basically need to make sure you post data in JSON format. Just seetting parameters won't do the trick.

In my case I had to create JSON something like:
{ fan: { email : 'foo@bar.com' } }

which equates to the HTML form input:
<input name="fan[email]" type="text"/>

To POST in Android. You can use something like this code.

public static String makeRequest(String path, Map params)
throws Exception {

DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httpost = new HttpPost(path);
Iterator iter = params.entrySet().iterator();

JSONObject holder = new JSONObject();

while(iter.hasNext()) {
Map.Entry pairs = (Map.Entry)iter.next();
String key = (String)pairs.getKey();
Map m = (Map)pairs.getValue();

JSONObject data = new JSONObject();
Iterator iter2 = m.entrySet().iterator();
while(iter2.hasNext()) {
Map.Entry pairs2 = (Map.Entry)iter2.next();
data.put((String)pairs2.getKey(), (String)pairs2.getValue());
}
holder.put(key, data);
}

StringEntity se = new StringEntity(holder.toString());
httpost.setEntity(se);
httpost.setHeader("Accept", "application/json");
httpost.setHeader("Content-type", "application/json");

ResponseHandler responseHandler = new BasicResponseHandler();
response = httpclient.execute(httpost, responseHandler);
}

Sunday, July 5, 2009

Finding Skins Under Android 1.5

I was testing using some custom skins under the Android SDK 1.5 and was a little perplexed that all of the documentation I read told me to put the skins in the directory

$SDK_ROOT/tools/lib/images/skins

This is not correct under Android 1.5 SDK! Instead you want to put them into the directory

$SDK_ROOT/platforms/android-1.5/skins

This discussion on the Android Google Group helped me.
http://is.gd/1ouFs

Also, you can find many cool skins here:
http://teavuihuang.com/android/

Hoping this will save others wasted time.

Tuesday, June 23, 2009

Mobile Software Development at Localtone

If some of you have been following me on Twitter you might have seen that I'm becoming actively involved in mobile software development. I thought might be good to do quick post relating to the some of the talks that I've given on the subject and a presentations I have coming up this month. If you are looking to learn more about mobile and are local to the Minneapolis/St. Paul area, I suggest you join us at one of the Mobile Twin Cities User's group meetings that I have founded. a BIG thanks to everyone who has presented at the previous meetings an Breon Nagy for recording our presentations!

Mobile Twin Cities
http://mobiletwincities.com - We meet the third Tuesday of the month.

Watch us online realtime or archived videos from the meetings can be found here:
http://www.ustream.tv/channel/MobileTC

Twin Cities Java user's Group - (TCJUG)
I presented at TCJUG where I showed my "Contratoid" Android app and deployed it to the Android market all in one evening.

Video, source code and slide from this meeting can be found here.

Video at: http://is.gd/U4Zr (the presentation starts about 10 minutes into the video)
Source at: http://is.gd/TZFP
Slides at: http://is.gd/U5tM

I presented on Android at the Ruby User's of MN (RUM) group. Slide from this presentation can be found here.

http://www.slideshare.net/justingrammens/AndroidIntro

If VoIP is your things, I also spoke on Adhearsion as well at RUM. Slides from that presentation can be found here:

http://www.slideshare.net/justingrammens/voice-enabled-applications

Finally, I'll be talking about Android at the Penguin's Unbound meeting this weekend where we'll try and create another Android app and deploy it to the market. Hope you can attended.

http://is.gd/1ayaT

I'm available for consulting around mobile software development on all devices. Would be more than happy to spend some time talking with your organization around how you can use mobile and VoIP technologies.

Monday, June 1, 2009

Android Themes

Here's a good blog post on doing themes within Android. With the latest release of Android 1.5, the interface is looking much more clean and adding themes to your application can really give you that "wow" factor to you users.

You can read more on the blog post and specifics around giving you application a them here.

Saturday, May 23, 2009

Podcast on Mobile and VoIP Technologies

My good friend Garrick Van Buren was nice enough to involve me in a conversation on mobile software and VoIP technologies. We had a lot of fun talking about where the market is today and where we see it going in the next 5 years. Exciting times are ahead for all of use in this space. Details of the discussion can be found on his Podcast blog at:

http://www.firstcrackpodcast.com/

Enjoy!

Sunday, May 17, 2009

Adhearsion Sandbox Rocks

I presented in April at the Ruby User's of Minnesota (RUM) on creating voice enabled applications using the Adhearsion sandbox and another service called tropo.com. Slides from the presentation can be found here. Some people I know were unable to attend or unable to follow along during the demo, so I thought it might be fun to put together a quick screencast of the steps to get yourself working in the sandbox. The sandbox is completely free and provided by Jay and Jason at Adhearsion.com to give developers like us an opportunity to get our feet wet and play with Adhearsion. Enjoy the screencast! It's amazing just how fast one can get up and running and hope you have an opportunity to start creating voice enabled applications in the future. There's a lot of potential customers out there using plain old cell phones and the cost to implement voice enabled applications using Open Source frameworks like Ruby on Rails and Adhearsion is a small fraction of proprietary solutions.