What tool to use to develop Android applications

Question: I am a long time Mac (Xcode) programmer. My client wants me to build and distribute an Android version of the latest iPhone app that she has ordered from me, but I am a little bit uncertain. iPhone app uses the language of objective-C and the Android apps are built in Java, ergo Xcode is not the answer. I have some experiences with NetBeans Integrated Development Environment (IDE) but I heard that it is not the best choice. What tool do you recommend for an iPhone programmer? Answer: You have more freedom with Android SDK than with Xcode and Apple, but Java is not objective-c, and iOS is not Android (Linux). Therefore you have to build a new app. Google’s Android is an operating system based on Linux. Android applications are written in the Java programming language. Android uses a special virtual machine (Dalvik Virtual Machine). Therefore you can’t run a standard Java code. The Android SDK, which can be downloaded from Google’s web site for both Microsoft Windows and Mac OS X machines, compiles the java code and resource files into a special Android Package. This package (.apk) file is similar to the .app bundle you build with Xcode. You are free to select your own OS X or Windows IDE, but you need an Android plugin to build the proper code. 1. First download or update your favorite Java IDE platform you want to use. Eclipse, NetBeans (or do not be surprised, Xcode or even Microsoft Visual Studio 2008 and 2010) work fine. 2. Find and download Google’s Android SDK and the plugins you will need to develop and test on. The Android SDK includes an emulator. You can emulate one or several more devices with different configurations. 3. After the successful installation, search for sample codes for some hints and start to build and test your own first Android application. 4. Distribute your application. Useful links:
Eclipse Eclipse IDE 1. Download and install Eclipse
Android SDK 3.0 2. Download and install SDK. Note the location of the SDK directory.
ADT Plugin for Eclipse 3. Install the ADT Plugin. Install individual versions of the Android platform.
Select Android platforms 4. In Eclipse, select Window -> Android SDK and AVD Manager. Select platforms. If platforms are not found, open the Preferences panel (Mac OS X: Eclipse -> Preferences -> Android) to check out SDK directory.
NetBeans NetBeans 6.9 IDE 1. Download the IDE from here
Android 3.0 SDK 2. Download and install SDK. Note the location of the SDK directory.
Android plugin 3. Add the Android plugin to the NetBeans. Where: Tools -> Plugins -> Android. Use the following URL: http://kenai.com/downloads/nbandroid/updates.xml
Platforms 4. Add Android platforms. How: Tools -> Java platforms -> Add platform… Find Google Android Platform and the SDK folder.

We prefer Eclipse IDE as it is well supported by Google and the community of Android developers. We use Eclipse both on Microsoft Windows 7 and Mac OS X machines. A good tutorial can be found here. If you’re an avid NetBeans user, don’t worry, because you can use NetBeans 6.9.1 and 7.0 (currently Beta) for creating Android applications too. We feel the pain of Visual Studio programmers. Building java apps with VS is p…in.a… (Added: You surely can use VS for Android development, because in the end, the IDE is nothing but a plain text editor with shortcuts to command line tools.) For example you can also use the latest IntelliJ for Android dev. Links: Documentation: Class references Example frameworks, classes & applications: Android sample codes Distribute your app: Android Market Place Apple Java tools: Xcode for Java (Android) development UI designer: DroidDraw User Interface designer for Android projects. Have fun with it! Notes: 1. Google claims to enable non-coders to develop working Android apps by connecting a series of “building blocks.” Details are here: Google App Inventor 2. iPhone programmers must learn a new application structure before they start to build a commercial app. The OS, the design patterns and naming convention are varied significantly from the iPhone. Like in iOS, an Android application lives in its own security sandbox, but doesn’t have a single entry point so there’s no main() function. Do not waste time to search for it ;-). Application components, such as Activities, Services, and Broadcast Receivers are activated by asynchronous messages called intent. Intents bind individual components to each other at runtime. iPhone world’s “View controllers” and “Views” are organized in so-called Activities. A Service run in the background such as network download or playing music in the background. A Content Provider manages a shared set of application data in the file system such as xml file, or in an SQLite database or on the web. Broadcast Receiver is a component that responds to system-wide broadcast announcements like a “notification”. Before the Android starts an application component, the OS must know that the component exists by reading the application’s AndroidManifest.xml file. This is the “info.plist” file of the Android app. A pretty weird and great aspect of the Android system design is that your application can start another application’s component (such as your Services component can start an Activity in another app), something like using “frameworks” in iOS, but you have to ask for permission from Android in a well behaved manner… 3. Before you get too excited… You cannot use Android GUIs with the Xcode Interface Builder (IB) because you get only iOS specific GUIs out of the iPhone SDK. You should be familiar with build and ant scripts to run Android SDK compiler, external emulator etc. I think it’s a good choice to use both Xcode and the specialized Eclipse Java IDE for each of their platform strengths. Let me be serious for a moment, I don’t think Apple will ever supply an Android “export” option to Xcode. Android development with Visual Studio 2010.