Martin Heller
Contributing Writer

Why Google Android developers should avoid multitouch

analysis
Mar 16, 20102 mins

Android phones have multitouch screens, but few applications support multitouch gestures -- here's why

In the days of the first Android G1 phone, a patch to the Android 1.0 OS circulated among developers to enable the multitouch screen on the device. The word was that it was a little buggy, there were no applications for it, and normal users should avoid it.

In Android 2.0, multitouch was officially added to the OS. I wondered why a slew of multitouch applications didn’t immediately follow this release; I found out the reason when I read through the new multitouch chapter in the beta 2 PDF of the book “Hello, Android, 3rd Edition” by Ed Burnette.

[ Keep up on mobile software development trends with InfoWorld’s Mobilize newsletter. ]

This warning box from the book sums up the issue:

Warning: multibugs ahead

Multitouch, as implemented on current Android phones, is extremely buggy. In fact it’s so buggy that it borders on the unusable. The API routinely reports invalid or impossible data points, especially during the transition from one finger to two fingers on the screen and vice versa. On the developer forums you can find complaints of fingers getting swapped, x and y axes flipping, and multiple fingers sometimes being treated as one. With a lot of trial and error, I was able to get the example in this chapter working because the gesture it implements is so simple. Until Google acknowledges and fixes the problems, that may be about all you can do. Luckily, pinch zoom seems to be the only multitouch gesture most people want.

Burnette then goes on to write an image viewer example that uses the pinch-zoom gesture. The event stream he dumps as he debugs the application reveals the unreliability of the API, but he manages to implement pinch-zoom by doing some fairly detailed analysis in the application. Even then, he warns that his application will be buggy if the user lets his or her fingers get within an inch of each other.

The lesson: Caveat coder. 😉

This article, “Why Google Android developers should avoid multitouch,” was originally published at InfoWorld.com. Read more of Martin Heller’s Strategic Developer blog and follow the latest news in Google Android and software development at InfoWorld.com.

Martin Heller

Martin Heller is a contributing writer at InfoWorld. Formerly a web and Windows programming consultant, he developed databases, software, and websites from his office in Andover, Massachusetts, from 1986 to 2010. From 2010 to August of 2012, Martin was vice president of technology and education at Alpha Software. From March 2013 to January 2014, he was chairman of Tubifi, maker of a cloud-based video editor, having previously served as CEO.

Martin is the author or co-author of nearly a dozen PC software packages and half a dozen Web applications. He is also the author of several books on Windows programming. As a consultant, Martin has worked with companies of all sizes to design, develop, improve, and/or debug Windows, web, and database applications, and has performed strategic business consulting for high-tech corporations ranging from tiny to Fortune 100 and from local to multinational.

Martin’s specialties include programming languages C++, Python, C#, JavaScript, and SQL, and databases PostgreSQL, MySQL, Microsoft SQL Server, Oracle Database, Google Cloud Spanner, CockroachDB, MongoDB, Cassandra, and Couchbase. He writes about software development, data management, analytics, AI, and machine learning, contributing technology analyses, explainers, how-to articles, and hands-on reviews of software development tools, data platforms, AI models, machine learning libraries, and much more.

More from this author