Indepth Review of The Google App Inventor
Google’s new App Inventor for Android comes with an ambitious goal: Allow anyone to create simple apps for their mobile phone. The tool, still in invitation-only beta, offers a graphical drag-and-drop programming interface instead of requiring that apps be written in Java.
I received access to the beta a couple of weeks ago and tested many of the available programming functions, using both the built-in Android device emulator and a loaner Droid X smartphone. I ran the browser-based tool on both Mac OS X and Windows 7. I also walked through a number of the available tutorials.
An easier way to program?
Now, let’s be clear: Drag-and-drop programming will not turn an average user into an expert coder. Even with a visual interface, devising complex applications is not trivial.
But just as you don’t need to create pivot tables in order to get value from Excel, you don’t need to be creating, say, a full-fledged fantasy football app in order to use App Inventor.
MIT professor Hal Abelson, currently on sabbatical in order to work on the App Inventor project, cites one student-created app that simply delivers a text auto-response when the user is behind the wheel (“Please don’t text me now, I’m driving.”) as an example of what App Inventor was designed to facilitate.
In other words, the goal here is not to turn the majority of Android owners into professional developers, but to give them access to more-robust phone customization than is currently available.
However, for those who are knowledgeable coders but not yet experienced with Android, App Inventor could make it more attractive to start developing for the platform, since this lessens the need to learn a lot of particulars. If you already have the skills to outline the steps needed to make your app come to life, you don’t have to worry about what code creates a button or what syntax is needed to pull a name up from the contacts database. If you can write good “pseudocode” — basic instructions in English describing each step of what your app needs to do — you should be able to use App Inventor.
There is a learning curve — even visual interfaces require some investment in time to discover just how they work. It’s less daunting than, say, learning Java, but there is a time investment, especially if you want to become proficient in creating applications that let you do more than tap a button to play a sound.
Building an app
There are two main parts to App Inventor: a browser-based design screen and the Java-based Blocks Editor (which is launched in a separate window by clicking an “Open the Blocks Editor” button). There is also an “Extras” application to download and install, containing items such as an Android phone emulator.
I found the first-time setup to be surprisingly frustrating. Logging into the browser-based software and downloading the additional components worked on the first try, but the final step — connecting a device — was more challenging: App Inventor wouldn’t see my Droid X at first, making it impossible either to view my app in progress on the phone’s screen while doing development work or to download my apps to the device. Even the helpful folks in the App Inventor Google discussion group didn’t seem to know how to handle that particular issue.
After some trial and error, it turned out that the default USB connection setting on the Droid X did not work for App Inventor, at least on my Mac, so I needed to change the phone from “PC Mode” to “USB Mass Storage.”
(This underscores what fans of the iPhone — and the Palm Pre, Palm Pixi and BlackBerry — argue is the drawback to Android’s open platform: Because one company doesn’t control hardware design and how devices interact with the OS, undocumented quirks such as this on some devices are more likely. I still think it’s worth working through issues like this in return for not being locked into one hardware vendor, though.)
The browser-based portion of App Inventor contains a listing of various components — buttons, sounds, videos, a “tiny database,” social networking components, sensors, text-to-speech and more — basically, all the available building blocks for an app.
To create a new application, you begin by simply dragging and dropping items into the central “viewer” portion of the screen. In a column on the right, you can then set some of the properties of that object, such as colors for a button or a specific sound file for a sound object.
If you want a component to do something specific — for example, play a sound after a button is clicked — you head to the Blocks Editor. There, each component/object in your application has a “drawer” that shows all its available actions.
For instance, the button drawer includes draggable icons that represent actions for when a button is clicked, as well as commands to change its color, size, image and text — either when the app first runs or when the button is clicked — as well as its visible and enabled states.
There are also separate “drawers” for built-in items that are available to every application by default. Here, you can select icons for math functions, lists (i.e., arrays), logic, colors and more for your components. You snap pieces together to create actions, such as telling the phone to play a sound and vibrate when a button is pressed.
The Blocks Editor also contains the button to connect an Android phone plugged into your computer to the App Inventor environment.
It wasn’t always clear right away where to go to find the blocks I needed. Need to set an index value when cycling through quiz questions? It’s in the “My Definitions” drawer. Set the question label? The “Question Label” drawer. Add 1 to the index value? Blocks “+” and “Number” in the “Math” drawer. (And I’ve got to say that dragging out three blocks from multiple drawers is not as simple as typing
$i++; — sometimes text really is quickest.)
On the other hand, I found that the drag-and-drop method cut down on maddening mistakes I sometimes make when programming — like misplacing close brackets and semicolons. But it didn’t eliminate them entirely, as I discovered when I tried to drag a “MyCall.PhoneNumber” block into an “AfterPicking do” block and it wouldn’t snap in. Turns out I’d snagged the wrong block and actually needed the “set MyCall.PhoneNumber to” block (the action of setting the number, not the contents of the variable holding the actual number).
However, with App Inventor, it was fairly easy to see where the problem was instead of hunting through dozens of lines of code.
Once you have finished snapping pieces together and otherwise designing your application, you can package and download your project to your phone as a stand-alone app. You can also download the source code to your system and then e-mail it to someone else, which right now is the only way people can collaborate on an App Inventor project.
How well does it work?
Unlike many Google applications that had a “beta” label long after they were production-quality with millions of users worldwide, App Inventor for Android is indeed a beta. There were a fair number of glitches being reported on the App Inventor discussion group, and there have been periodic issues, such as Google’s App Inventor server being unable to package applications. I think Google has done the right thing in limiting access while it works out these kinks (it’s hard to respond adequately to bug reports from millions of users), especially since capacity is still limited.
Besides my problem during initial setup, I encountered several other minor snags, such as my app not playing a sound when the button was tapped after I had followed step-by-step instructions for the simple “Hello Purr” first tutorial. The Droid X vibration worked, but the sound did not. Yet the sound played just fine when I tried the same app on the emulator. This was another odd glitch related either to Mac OS X or to certain handsets, since switching from the tutorial-provided WAV file to my own MP3 file solved the problem (and did so for another user with a T-Mobile G1 phone).
And I never did get images to appear on the Droid X during development, even though they were supposed to. However, the images displayed just fine after I saved, packaged and downloaded apps to the phone.
Overall, though, I found the step-by-step tutorials on the App Inventor site to be helpful and well documented. I was initially confused about when to use the main browser-based screen and when to go to Blocks Editor, for example, but working through the examples gave me a reasonable feel for which window to use for each step.
After getting through the warm-ups, I enjoyed being able to create applications for a mobile device without having to write detailed code. It was pretty impressive to be able to create a complete touch-screen drawing application, including buttons to change colors and the capability to create dots when touched and lines when dragged, in well under an hour with the PaintPot tutorial.
And once I got the hang of the interface setup, I found it rather slick to be able to add another button color to the project by simply dragging out the “color black” block icon and snapping that into the “set Canvas1.PaintColor to” block, which I’d already snapped into the “when blackButton.click do” block.
I was pleasantly surprised to see some basic debugging tools included in the visual interface, such as a “watch” function that allows you to observe the values of variables in the Blocks Editor as you interact with your app on a connected phone.
Providing significantly more (and more varied) tutorials and sample apps would go a long way toward expanding the App Inventor audience. For instance, while there are several social networking components, including one for Twitter, it wasn’t immediately apparent to me how to use them.
The log-in block was an obvious first step, but how to set it up was less intuitive. Did I have to also include username and password boxes, or were those included with the block? How do you set it up so the if-login-successful block moves you to another screen display, when for now you can’t create multiscreen apps?
There are also little things that could make App Inventor quicker to use, such as allowing a press of the Return/Enter key to signify “OK,” or making a way to drag out four text elements at once instead of having to click and drag multiples out one by one.
The challenge for any tool like this is how to balance ease of use with robustness of functionality. In other words, the more it can do, the more complex it’s going to be to use.
Professional developers may be frustrated that App Inventor will not export Java code (although you can import and export App Inventor source code), and there’s no way to build your own components. (The App Inventor FAQ says, “A component development kit is being considered. This will allow programmers to build App Inventor components with Java and expand the functionality of App Inventor.”)
I believe this kind of Google-backed drag-and-drop phone customization will help Android in its battle with Apple‘s iOS, especially among users who are attracted to the idea of a more open mobile platform than Apple offers. No, it won’t allow all users to create professional-quality apps they can sell — it wasn’t designed for that. (In fact, Google is still working on how it wants to connect App Inventor to the Android Market.)
But a tool like this can change the relationship between power users and their mobile phones, by offering a reasonably simple way to do basic customization and automation beyond what’s typically available on a phone. Developers who haven’t yet bothered writing mobile apps might be enticed to spend a couple of hours creating an app. And students will be a lot more enthusiastic about learning the principles of computer programming if they can write simple apps for their phones just by dragging a few blocks around.
In addition, it gets your mind churning, devising other ways to customize the phone. For example, when going through the on-screen “painting” tutorial, I tried adding more colors and changing line widths. And then I started thinking of other apps I’d like to build for my phone — such as my own “find my car after I park it” app, or a simple stitch counter to keep track of rows when crafting.
Google App Inventor for Android isn’t meant to be a replacement for a full-fledged SDK. For what it is meant to do, though, App Inventor is a valuable addition to the Android ecosystem. If you’ve got an interest in developing mobile apps but haven’t gotten around to actually starting the coding, it’s worth sending in an App Inventor access request.
Category: Android News