LearnThe ‘New’ Beginner’s Guide to Android

Ben Jakuben
writes on September 3, 2014

‘Android’ is a term that means different things to different people. Many people might first think of smartphones, but what else can it be? Android is really the name for the operating system, which is optimized to power screens of all sizes. Android runs on phones, tablets, watches, TVs, and even cars!

All About Android

WHAT IS ANDROID?

Android devices

‘Android’ specifically refers to a mobile operating system (based on Linux) that is developed by Google.  It is open-source software, meaning that anyone can download the source code from the Android Open Source Project and use or modify it. Hardware manufacturers like Samsung or LG often take the base Android code and then add their own proprietary software features to it to run on their own phones or devices.

IS ANDROID JUST FOR PHONES?

Definitely not! Though phones might be the most popular device running Android, there are many tablets and other devices available. Some popular tablets, for example, are the Nexus 7 and the Kindle Fire from Amazon. There are also watchescamerasgame consolesTVs, glasses, and cars that run the Android operating system. Heck, there are even Android appliances!

As for phones, Android users can pick the device that’s just right for them.  Budget-conscious users can often find cheap Android phones with pay-as-you-go service, or gadget freaks like myself can opt for large, high-end phones like the latest Nexus phone from Google or a comically large (but cool) Galaxy Note 4. What’s more, if you don’t like how the operating system on your phone is configured, you can always overwrite it with a custom version, like the popular CyanogenMod.

WHAT CAN ANDROID DEVICES DO?

The hardware features will vary depending on the type of device it’s running on, but the Android operating system provides support for cameras, GPS location, Bluetooth, Near-Field Communication (NFC), accelerometers, compasses, gyroscopes, and more! The Android operating system features software components like live wallpapers and widgets, a powerful notification tray to help you keep track of important updates, voice typing, and seamless app integration, which allows users to easily share information via social networking apps or other forms of communication, like Bluetooth or NFC.

All About Android Development

As the number one mobile operating system in the world, Android devices are used by more people than any other type of mobile device.  This gives developers a great opportunity to develop apps that can potentially be used by hundreds of millions of people. Getting started with Android development might seem a little overwhelming, but our mission at Treehouse is to make it approachable and fun. Take a look at the Build a Simple Android App project if you want some step-by-step instructions on how to get started, but read on for more details.

Android Statues

Every major release of Android has had a food-related code name, and a statue to commemorate each is visible at Google HQ*.

WHAT LANGUAGES CAN I USE TO WRITE APPS FOR ANDROID?

Android apps are typically written in a programming language called Java. Java is immensely popular, and as an object-oriented language, it’s easy to pick up if you’ve worked with other object-oriented languages like C#, Objective-C, or Ruby. Google also provides a Native Development Kit (NDK) that allows developers to write important parts of their apps with native languages like C or C++.  This can be helpful if you need to reuse existing code or libraries in those languages, or if you want to try to get as best performance as possible for your app.

There are some tools that allow you to write apps using web languages like HTML, CSS, and JavaScript.  You can either write apps that run inside something called a WebView, meaning that it’s a full-fledged web page that runs inside an app instead of a browser, or you can use tools like PhoneGap or Appcelerator Titanium to write code that compiles down to native code behind the scenes.  There are pros and cons to taking this approach. In general you will get the best results by using a native language like Java, but you can certainly make solid apps that can delight your users with whatever tool you choose. If you really love another programming language, you can use some 3rd party tools to write apps in that language, though these will always lag behind the latest features that get rolled out with each Android update:

HOW DO I GET STARTED DEVELOPING APPS FOR ANDROID?

If you follow the recommended approach and want to write an app using Java, then the easiest way to get started is to grab one of the Android development bundles provided by Treehouse. In the first stage of Build an Simple Android App I’ll show you how to setup an Android development environment using Android Studio for Windows, a Mac, or Linux. From there you’ll learn the basics of Java and Android programming by building a simple app that displays a random fun fact each time you tap on a button.

The Android Developer site also has extensive documentation about how to get startedhow to design an app for Android, and details about all the Application Programming Interfaces (APIs) available. The Android development tools are available for Windows, OSX, and Linux, so you don’t need to buy any additional hardware to develop Android apps. It’s not completely straightforward to set up your computer for Android development, but it’s not terribly difficult, either. The basic steps are:

  1. Install Java on your computer (though it may very well already be installed).
  2. Install Android Studio.
  3. Download the at least one version of the Android SDK and an image to use for an emulator using the SDK Manager inside Android Studio.

HOW MUCH DOES IT COST TO DEVELOP APPS FOR ANDROID?

It’s totally free to start developing apps for Android!  The Android SDK includes an emulator that acts as a real Android device right on your computer, so you don’t even need a phone or tablet.  All the tools listed above are free, so all you really need is a computer, an internet connection, and some time and dedication. If you fully develop an app and eventually want to publish it on Google Play, then you will need to pay a one-time registration fee of $25.

What’s the difference between Kit Kat, Android L, SDK 4.4, and API 19?

Ah, Android versioning is a strange and wonderful place. Each release of Android is a new version with a new set of code names and numbers that correspond to it. It can be very confusing at first!

Code name OS Version API Level
Ice Cream Sandwich 4.0 14
Jelly Bean 4.1 16
Jelly Bean 4.2 17
Jelly Bean 4.3 18
Kit Kat 4.4 19
Android L ? ?

At the time of this writing, the latest stable version of Android is 4.4. This is the version number of the operating system, but it’s often referred to by its code name, “Kit Kat.” Each code corresponds to a version number, although sometimes it might span multiple version numbers. For example, “Jelly Bean” was for Android 4.1, 4.2, and 4.3. Wikipedia has a great page that maps them all out.

As developers, each new version of the operating system includes an updated version of the API that we use to develop our apps. Each point release like 4.4 increments the version number of the API. Kit Kat 4.4 has API level 19, Jelly Bean 4.3 has API level 18, and so on.

Android L is the upcoming release of the operating system, but it is currently in a public beta stage, so we don’t know any of the exact code names or numbers. It should be released shortly, at which time we will learn the new name, version number, and API level.

What about Material Design? What is it?

If you have been reading about Android, you may have come across the term “Material Design,” which is the new design language and aesthetic to be used in the next version of Android and other Google products. It has been generally well received and the apps previewed with Material Design look fantastic. There is some extensive documentation about it, and it’s worth looking at if you are going to design or develop Android apps. You may not be concerned with all the little details, but having an overview of the design principles will help you create engaging apps. (I particularly enjoyed the animated gifs used in the Animation section.)

How do I develop for all those different devices?

The core concepts of Android development are the same for phones, tablets, watches, and TVs. You can use Android Studio for everything, and you can often use most of your code for different types of devices. Sometimes you may need to modify your user interface, but you don’t need to create a new app for each device you want to target.

My Recommendations

There are many ways to develop apps for Android, but in my experience it is worth following Google’s recommendations.  One of the biggest benefits I haven’t mentioned yet is the ever-expanding community of Android developers, the bulk of which are using Java and Android to write their apps. If you get stuck, resources like Treehouse and StackOverflow are available with large user communities for support, and in true open-source fashion, there are a number of incredibly useful libraries and tools available to use in your development.

If you are turned off by Java as a programming language, just know that Java for Android is much different than the Java of yore for big, complex, enterprise systems or even programming classes you may have taken in school. Having written apps for Android, iOS, and the web, it is not the language that matters as much as the tools and resources for it. Don’t let the language get in the way, and learning another language will only help you become a better programmer.

Start with some nice tutorials (like what we offer at Treehouse) that walk you through some basics and don’t worry about remembering or even comprehending every detail. Just try to absorb what you can from the experience so that you can start to put all the pieces together when you start to work on your own projects. Then pick a simple project that covers some of the things you think you are interested in and will need to use a lot.

After going through some of the tutorials on the Android developer site when I first started, I then wrote a very simple app to input a search term with a text box (EditText), query Google, and then parse the results to display them in a list on a separate page (Activity). For me this helped me understand the overall app architecture, how to record data from the user, how to send data over the web and retrieve results, how to parse results into meaningful data structures, and how to navigate from one screen to the next with shared data components.

If you are the kind of person who likes to learn from the dead-tree medium, then I would highly recommend Android Programming: The Big Nerd Ranch Guide by Brian Hardy and Bill Phillips. It covers most aspects of Android development and gives you some fun and useful projects to work through.

What’s next?

The first Android device, the HTC Dream, was released in October 2008. Android matured quickly and rose to become the most popular platform for smartphones, and now the ecosystem is growing rapidly with new types of devices and uses. It’s exciting to think about what the future holds for Android devices and developers. Now is the perfect time to learn how to write your own apps!

*Google HQ image courtesy of Atomic Taco under the Creative Commons license.

16 Responses to “The ‘New’ Beginner’s Guide to Android”

  1. I believe an update is required to this post to include the newly Android Studio supported language: Kotlin.

  2. Francis Rome T. Lim (Philippines) on October 13, 2016 at 5:39 pm said:

    I like to learn all about Android! but i have low knowledge in java! can you guys help me, because i have project on my school to make a mobile apps simple in a tutorial 🙂

  3. I will like to take the android course but, I don’t know anything about it and also my java knowledge is too low. Do you recommend me to take this course ??

  4. nice to read this tutorial…its very helpful for android developer…
    https://play.google.com/store/apps/details?id=com.fourfox.ringaaudio.cutter.maker

  5. To find android tips and tricks, examples, tutorial: Click Here

  6. nagiŕeddy Reddyvari on October 3, 2015 at 11:56 pm said:

    Sir I learn good things

  7. Sina Maleki on September 27, 2015 at 7:36 am said:

    Hi Ben, I’m really interested in Android but what will I do in future if I learn all of the treehouse Android courses? I mean I was confused about how to learn and where is the good way to start? I’m really like to learn but I don’t find the good way to start.
    Best

    • Hi Sina–software development, no matter what language or platform, involves never-ending learning! But that’s an exciting part of it; not something to worry about. There will always be tons to learn in Android alone, and no one person can master all of it. What happens is, the more you program in it, the more things stick and you get a very good understanding of how everything works. It then becomes much easier to learn new things as you want or need to. For example, learning how to add location awareness to an app is pretty easy once you understand the basics of building an app and using things like interfaces and callback methods. It’s super rewarding, so I hope you stick with it!

  8. Thanks for this. I really love how easy it is for beginners to read and understand your blog posts. This is by far the best beginners guide to android that I’ve ever encountered.

  9. Helpful info. Lucky me I discovered your web site by accident, and I am stunned why this coincidence didn’t came about earlier! I bookmarked it.

  10. Ben,

    I started your course today – “Build a Simple Android App” – and then saw the link below the vid to your blog.

    Great blog – it answered so many questions for me. And generated a lot more questions.

    Thanks for providing all of the links in your blog – great resources for learning.

    Thanks again, Alvin

    • Ben Jakuben on September 4, 2014 at 9:59 am said:

      Thanks Alvin! Hope you learn a lot and get answers to your questions. Post in the Treehouse Forum for questions and discussions with other students (and me).

  11. Woah your blog is astounding i adore looking through your posts. Sustain the truly amazing art! You comprehend, many are searching rounded with this facts, you are able to guide these significantly.. http://www.nickvivid.com

  12. Hi Ben:

    I started with iOS at TreeHouse a few moths ago and I love it. In fact, some of those courses were offered by you. So far I have been able to create and published a few apps thanks to that.

    So, I will check out the Android course for beginers as you sudgested. I’m interested in creating an application compatible for both platforms (Android and iOS).

    Thanks much;
    Gabe
    (TreeHouse profile: Gabriel Vazquez)

Leave a Reply

Want to learn more about Android?

Android is the most common mobile platform in the world. Learn about the powerful development tools from Google, and how to create Android apps using Java.

Learn more