Jump to content

How to start programming in Android

+ 3
  macslocum's Photo
Posted Mar 02 2010 06:00 AM

Android has taken big steps over the last year. What began as a promising but little-implemented operating system has matured into a strong OS powering a slew of mobile devices. It's also coming to tablets and netbooks.

There's a big opportunity here, but the path to Android programming isn't as clear as it should be. That's why I got in touch with Tony Hillerson, a mobile developer at EffectiveUI and the instructor behind the free online course "Developing Android Applications with Java." In the following Q&A, Hillerson discusses the skills and tools you'll need to dive into Android programming.

Mac Slocum: If you want to get into Android development, what technical and programming skills should you have?

Tony HillersonTony Hillerson: You'll feel most at home if you already know Java. I also think that since the apps you make with Android are heavily dependent on the frameworks, anyone with an understanding of common, object-oriented languages like C++ and C# will pick things up quickly.

Understanding how Android's XML-defined views translate onto the screen isn't hard, but some experience with a tag-based view technology like HTML or Adobe's Flex will make the views very familiar.

MS: What are the hardest initial things to overcome as an Android developer?

TH: When I started I found the layouts, which control how components are presented in the views, kind of inflexible and quirky. I think those have changed a bit for the better -- at least there are less layouts to worry about now -- but I still miss a percentage-based layout like you use in Flex.

As I got further into my first big Android application, Brightkite, I found that skinning, or making things look like my designer wanted, was very confusing. It required digging into the source code to make things look the way I wanted. Even then, there were things that were just not skinnable, or required making a completely new component, or changing the design.

I really wish that the camera acted more like a service, as it does on the iPhone. Instead taking full-size pictures in the app and using those pictures is harder than it should be.

Another thing that is almost unbelievable is how much of a pain it is to work with maps. It requires signing up for an API key per computer to even see maps. Compare that to iPhone map development with Google maps, where you don't have to do any of that. They just work. Android is made by Google, right? That's something I hope Google fixes soon.

Those were my pain points, but I think I got pretty far toward having a nice, working, application before I ran into them. All in all I like the framework a lot.

MS: What tools should you have on hand?

TH: You need the Android software development kit, which comes with the emulator. I prefer Eclipse for Java development, and the Android Developer Tools work with Eclipse.

It also really helps to have a device, especially when doing things with location or with the camera. I wouldn't recommend putting anything on the Android Market that hasn't been extensively tested on a real device.

MS: How does Android programming compare to iPhone programming?

TH: I think they both have their ups and downs.

Objective-C is a dynamic language, so it's easier to do more elegant things in the code. On the other hand Objective-C is incredibly verbose, even compared to Java, so you always seem to write more code than you think you should. Although despite that, or maybe because of it, I find it personally satisfying to write code in Objective-C.

Jars are a great asset for Java development, because it's a lot easier to reuse other libraries. The library situation in iPhone development is basically a choice between just copying in code or setting up dependent projects in XCode, which can be confusing. On the other hand, I really like some of the frameworks available on the iPhone, especially Core Animation. They're super powerful and easy to use.

Android really shines because it's open source. I don't have to guess or experiment or decompile things. I can just look at the source and see why things are the way they are.

MS: Manufacturers are using Android on tablets and netbooks as well as mobile phones. What things do developers need to consider as they're creating Android-based apps for multiple devices?

TH: The big one is layout. If you fudge a layout to just get it working on a single device, it's going to get you later. You'll also need to prepare for different APIs not being supported, like the camera for instance. Designing the application well is going to make you think harder about the core functionality and use cases you want to support.

MS: What are the best support resources for Android programmers?

TH: The Android Developers site is the obvious one. It has all the associated documents, code and the Google groups. If I don't find what I need there, I just Google and let that look for other sites with information I may want.

Of prime importance, though, and I can't stress this enough: Android is open source. Read it. Understand it. See what the Google engineers did to make the core apps do what they do.

MS: What's your favorite Android app?

TH: Goggles is the coolest Android app that I've seen. Layar is also pretty sweet. And I can't forget to mention Brightkite, which is tons better than Latitude!


Tony taught a 90-minute "Build your First Android App" course a few months ago. You can access the free video here.

Note: This interview was condensed and edited.



10 Replies

0
  saumyass's Photo
Posted Oct 20 2010 10:16 PM

I want to develop android application, what are the initial steps i need to do. I already downloaded android SDK r07 from developer.android.com, eclipse classic 3.6.1 from eclipse website, jdk 6.1, ADT 0.7.1, i don't know whats the next step. when i click eclipse.exe, it shows one command prompt, thats all. How i get started with eclipse and android, can anyone help me regarding this? Thanks in advance.
0
  gotenks05's Photo
Posted Nov 20 2010 12:57 PM

The Android Developers guide should help. It is located at the following

developer.android.com

You should learn Java first, before you delve into Android programming, since debugging the application will require knowledge in Java.
0
  jcohedman's Photo
Posted Jul 07 2011 05:55 PM

see this: http://www.basic4ppc.com/
I´m a newbie in android, and in two weeks I´m dealing with MySql, thanks to Basic4Android!
0
  richieb's Photo
Posted Jul 11 2011 10:14 AM

Don't forget the App Inventor from Google: App Inventor
0
  Joseph Kim's Photo
Posted Aug 20 2011 09:19 AM

I agree with richieb, you should definitely check out App Inventor, especially since MIT has taken over it from Google after neglecting it for so long. Another good resource would be this article by the folks at Approach Mobile: android app development
0
  AlexAndR's Photo
Posted Dec 20 2011 06:59 AM

I learn Java programming on Android with DoridDevelop
0
  geraldholmes's Photo
Posted Apr 17 2012 07:51 AM

I code in Visual Basic. Is there a way to make a program I've already designed, written, and built into an .exe to an Android? android apps developer
0
  VentureHire's Photo
Posted Aug 04 2013 10:13 PM

Hi,

The inception of this flourishing Android phone market in 2008 also gave birth to the much-evolving Google play a.k.a the Android App Store. The best thing about Android is that it is based on the Linux platform and provides absolutely easy environment accessibility and the core functionality for building fabulous applications for mobile phones.

Java essentials are required for Android app development. To follow the steps for learning Android programming, click on:


http://venturehire.c...-app-developers
0
  Learnmax's Photo
Posted Sep 09 2013 09:24 PM

Hi,
For android we need to learn Java and C++.

For more info :
online iphone learning | KPO Service India
0
  rezaplusplus's Photo
Posted Oct 13 2013 05:35 AM

uselynda video and course.
and our Android Application Development Course in Tehran
کلاس آموزش برنامه نویسی اندروید