This is a mirror of official site: http://jasper-net.blogspot.com/

Android for .NET Developers - Getting started

| Monday, February 28, 2011
Introduction
To call you a real mobile programmer, Windows Phone 7 (WP7) is not enough. WP7 is the youngest mobile platform and far from being the most used. Being part of a mobile project today means dealing with two major platforms - iOS and Android. For any .NET developer making the jump to WP7 is no big deal. Getting started with iOS and Android is quite another story. Of the two, Android is definitely the easiest to address and learn. Note that I'm talking about the ability of writing native applications using the native SDK. For .NET developers, in fact, the MonoTouch framework and the upcoming MonoDroid framework from Novell represent a shortest and viable path as they let you use C# and the .NET programming model. For MonoDroid, you can also stick to Visual Studio.

Starting with this article, I'll discuss what you need to know to approach Android programming without any aid from your .NET expertise. Therefore, be prepared to switch to another IDE and to use the Java language and a brand new SDK.

For the purpose of this article, I'll be using JetBrains' IntelliJ IDEA Community Edition, a free IDE for Java and Android development. I chose IntelliJ over the classic Eclipse IDE empowered with the Android plug-in and I'm using it for all of my Android development.

Getting Up and Running
There a couple of important things you need to do before you can install the IDE and proceed to your first hello- world Android application. First and foremost, you must install the latest JDK from the Oracle’s site. Next up is installing the Android SDK for Windows. Note that during the Android SDK installation process, you need to set up an Android Virtual Device (AVD) to run applications in the emulator. Also, don't be too surprised if you end up facing some problems with a USB driver (which is required for Windows but not for Mac and Linux). The USB driver is required to debug applications on the real device. Whether you face problems or not may depend on the specific device you use. However, information on how to work around problems is easy to find.

At this point, you go with the IDE of choice and if any of the previous steps completed successfully, you should be ready to create your first project. JetBrains has an excellent tutorial on how to get started with IntelliJ IDEA. You can find it here.

IntelliJ IDEA gives you an experience that is kind of comparable to that of Visual Studio. Don't get me wrong. however. I'm not saying that IntelliJ IDEA, or any other current IDE available, is really like Visual Studio. What I'm saying is that IntelliJ IDEA provides a seamless integration between the code editor and all the command line tools you need to use in order to compile the source, build the Android package and start the emulator. Figure 1 shows the window through which you can create and edit the AVD for testing your applications.

Figure 1: The AVD manager in IntelliJ IDEA for Android.

android-for-net-developersgetting-started-1.jpg

Read more: dotNetSlackers

Posted via email from Jasper-net

0 comments: