Inventin’ with App Inventor, Part II

I have completed a .1 release of my first Android app, hammered together with Google’s App Inventor toolkit.

It’s a simple but trailblazing RSS displayer that pulls in bill status from the New York State Senate’s own open government platform, called unsurprisingly, Open Senate.

To be truthful there’s nothing unique or groundbreaking about another Android app that displays government information.  In fact, half-way through my work I discovered Open Senate already has shrink-wrapped iPhone and Android apps.

The revolutionary part of my efforts has little do with me; they reside with Google.  Thanks to its App Inventor, any somewhat technically evolved person can make and customize useful mobile apps that are just right for their purposes.

And it’s all free, minus your own perspiration equity.

Software developers have always had some tools to take the tedium out of the programming process—GUI design aids, database query helpers, software language correctors, etc.

Somewhere in the 90s separate aids were mashed up to become visually-oriented rapid development environments. These were the ancestors of Android Inventor and another great (but under-appreciated) tool I’ve used in recent years,Yahoo Pipes.

Of course, no one cared—outside of the programming trade—about software automation until a new generation of consumer gadgets came on the scene with all sorts of practical capabilities, not the least of which is their impressive social networking functions. It finally now made sense for non-programming do-it-yourselfers to learn about this software genre.

 

Yahoo Pipes is an unsung visual tool I used in this project.

That brings us to App Inventor. Google’s rapid prototyping tool lets you visually program by linking together basic programming functions of logic and control. For a generation brought up on multi-player games, App Inventor is probably no more difficult to master than World of Warcraft.

That’s not to say there aren’t some nasty technical details to work out. As I mentioned in the first post of this series, App Inventor doesn’t naturally support feeds or web services—a major deficiency.

You have to trick Inventor’s TinyWebDB component, which is really used to read data from Google’s own database cache, to do double-duty as a feed reader.

TinyWebDB expects a special JSON format of key-value pairs. I certainly didn’t want to do any  serious programming to produce this stream. That’s where Yahoo Pipes came in.

Using Pipes, I simply drew a flow—you can see part of my work above—to take the data received from the Open Senate’s published web service APIs.

By providing the right API parameters, I pulled in the data from the specific Senate committee I was interested in—Energy and Telecommunications. Yahoo Pipes’s “Fetch Feed” component performs this little miracle.

Yahoo Pipes also excels at filtering and combining data, so with a few more of its components tied together I crafted the feed I wanted: bills concerning cable and telephone matters.

I was almost done with my work, and up until this point I was not doing any real programming. But I got dragged back in: Yahoo Pipes doesn’t produce the right key-value JSON pairs, so I wrote, under duress, a little PHP code  hosted on the free Kodingen servers to do the final encoding.

 

My own take on an Open Senate reader

To summarize: App Inventor can’t read Open Senate web services directly, so I created a simple Yahoo Pipe to read and filter the Open Senate data, which feeds a little bit of PHP to produce a JSON stream for my App Inventor’s TinyWebDB function.

It’s not an ideal solution by any stretch.

And App Inventor has a few of its own glitches that made it difficult to achieve my design ideas. Note to Google App Inventor team: It would be great if AI could support multiple TinyWebDB components.

I did take a peek at the Open Senate’s official Android App. It’s a nice, but blunt tool for searching the New York Senate’s legislation database. It’s not really what I had in mind for my telecom-focused feed display software.

Not to worry. With Google’s free Android development kit and Yahoo Pipes, I got closer to what I really wanted.

Enhanced by Zemanta