Code and Slides from FITC Mobile 2009

by Yoni Samlan on Sep 14, 2009

For those of you checking out our presentations at FITC Mobile, here’s the source code for the first session on introductory Android development, and the more complete source code for the second session on Android homescreen appwidgets.

The slides for our intro presentation are hosted on Prezi. Henry will be doing a narrated screencast of his part at some point in the next few weeks, and I’ll be doing a more complete writeup of the code portion with notes in a later post here on Active Frequency’s blog.

You’ll notice I linked in specific files from JTwitter rather than just including the .jar; there’s a lot of unnecessary code in the .jar and the J2SE source is a little lighter and cleaner, and hopefully makes it especially clear what the Twitter client is actually doing.

The demos use the JTwitter library (LGPL), and the icon is from a great Creative Commons set called Tweeties by Chris Wallace.

About Yoni Samlan

Yoni Samlan is a partner and developer at Active Frequency. He's been programming since he was yea tall, and has been a professional Python and Django developer since 2005.

  • d3space

    Thank you! I attended your session and have been wanting to make a homescreen widget since cupcake come out. This should be a great start!

  • ysamlan

    Thanks for coming to the session; hope it helped clear up AppWidgets a bit. I'll try to post a more complete writeup and notes from the FITC talks later this week, too.

  • Guest

    Is the source code for the android home screen widgets incomplete? All I get is the “Loading…” text.

  • ysamlan

    It should work fine — I just tested it from a clean download to be sure. Possible issues: You have to give the code a valid Twitter username and password (in TwitterPoster.java where it says “USERNAME_HERE” and “PASSWORD_HERE”), and your emulator needs network access up and running. It's very basic with no error handling at all on the widget, so when it runs into any problems at all (connection timeout, username/password twitter error) it ought to crash hard with a stacktrace if you're running in Debug mode in Eclipse… What does the ADB log tell you when you add the widget to your emulator homescreen?

  • Guest

    Looks like the company firewall was causing issues – the app was throwing 403 exceptions. Thanks for the tip! I thought the home screen widget contains an edit box for tweets so thought something was missing, but I must've confused it with the twitter app instead.

  • Anonymous