Developing Android apps for x86: What you need to know

Intel is planning a big Android push this spring, and the 'Ice Cream Sandwich' SDK lets developers join in

Intel has been all but absent from the mobile revolution of the last few years, but the chip giant is hoping to change that in 2012. It's betting big on Windows 8, hoping its range of CPUs will power both tablets and desktops running the new pan-device version of Windows and give it an edge over ARM chips that will -- at this point-- run only tablet-style, aka Metro, apps. (Intel-based tablets would run both Metro and "legacy" Windows 7 apps.)

But Intel also wants a presence in smartphones and non-Windows tablets, and to get there, it convinced Google to make the new Android 4.0 "Ice Cream Sandwich" work on Intel x86-based devices in addition to their ARM-equipped counterparts supported by all versions of Android. By the way, Intel says we'll see those first x86 Android devices this spring, after device makers get their hands on sufficient quantities of Intel's new "Medfield" Atom CPU, now entering production.

[ Go deep into HTML5 programming in InfoWorld's "HTML5 Megaguide Deep Dive" PDF how-to report. Then understand the issues surrounding HTML5 today in InfoWorld's HTML5 Deep Dive PDF strategy report. | Get software development news and insights from InfoWorld's Developer World newsletter. ]

Now that Google's Android 4 SDK is out, what do developers need to know to create Android apps that wil run on the future Intel-based smartphones and tablets?

The good news is that Android developers don't have to worry about maintaining and distributing separate x86 and ARM versions of their apps. "Dalvik" Android apps -- those created via the Android SDK operating on Android's Java-derived Dalvik virtual machine -- will run as is on both ARM- and x86-based devices. That's because the virtual machine insulates the apps from the underlying processor, and with Android 4.0, Google is supplying Dalvik VMs to manufacturers for both chip architectures.

But if you're using the Android 4 SDK, you've probably noticed that you can't create an x86 virtual device, just ARM ones. These virtual devices let you run simulated Android devices for debugging and other testing on your Windows, Linux, or Mac OS X PC. That'll change soon, Intel says, once Google approves the Intel virtual devices. At that point, they'll be added to the SDK, and developers who have the SDK installed can get them by running the package updater. The virtual machines will likely be available first at Intel's own Android developer site.

You don't have to exercise patience if you use Google's Android NDK extension to the SDK. The NDK lets you develop native apps that work directly with the devices' underlying hardware, such as for performance-oriented apps like games. The NDK has Intel support now.

If you're concerned about developing both x86 and ARM versions of your native app, don 't be. The NDK lets you create fat binaries, which include the appropriate libraries for both chip architectures in the same package. Alec Gefrides, who heads Intel's Android developer program, says Google has ensured that ARM- and x86-based Android devices will offer the same capabilities; developers don't have to worry about using hardware or other functions for one architecture not available on the other.

Finally, what about that open source x86 Android effort announced earlier this month? It's not relevant, as it's aimed at porting Android mainly to laptops and desktop PCs, as well as to tablets running x86 CPUs from Intel rival AMD. Android on a laptop or desktop PC seems more like a science project to me, not a market for developers.

As for AMD tablets, I would've expected AMD to work directly with Google to get broad support, though the Google-Intel relationship may preclude that. That would also explain why MIPS Technologies had to use the open source version of Android to get the Google OS on devices using its CPUs. In any event, I'd look for more active involvement from AMD before investing my time developing apps dependent on a third-party open source effort.

This article, "Developing Android apps for x86: What you need to know," was originally published at InfoWorld.com. Read more of Galen Gruman's Mobile Edge blog and follow the latest developments in mobile technology and programming at InfoWorld.com. Follow Galen's mobile musings on Twitter at MobileGalen. For the latest business technology news, follow InfoWorld.com on Twitter.

Mobile Security Insider: iOS vs. Android vs. BlackBerry vs. Windows Phone
Join the discussion
Be the first to comment on this article. Our Commenting Policies