Introduction to Android App Development
As you are probably aware, Android and iOS are the two major mobile operating systems at present. These two OSes are installed on more than 99% of the mobile devices (smartphones and tablets). Of these two, Android is the dominant platform with more than 85% market share in 2018. Therefore, it goes without saying that if you wish to learn about mobile app development, it makes sense to learn Android app development first. So it is time for introduction to Android platform.
Introduction to Android
You already know that Android is an operating system for mobile devices such as smartphones and tablets. Apart from these, Android OS is also used in other types of “smart” devices such as smart watches, smart glasses (Google Glass), smart home appliances (e.g. refrigerator), cars, cameras, smart TVs etc. However, smartphones and tablets are still the main target of the Android platform. Hence, as an Android developer, most of your time and efforts would be probably be invested on these devices only. Please note that Android apps are developed using Java and the user interface of the apps is designed using XML. Therefore, you need to have prior experience in Java programming and some basic knowledge of XML. If you have no experience of Java or XML, you should first learn Java and XML.
As stated by Wikipedia –
Android is a mobile operating system developed by Google, based on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets. Android’s source code is released by Google under open source licenses, although most Android devices ultimately ship with a combination of open source and proprietary software, including proprietary software required for accessing Google services.
To sum it up, Android is an open-source mobile operating system (developed by Google) which is based on the Linux kernel and targets touchscreen mobile devices such as smartphones and tablets.
A bit of history of Android
Android Inc. was founded in Palo Alto, California in October 2003 by Andy Rubin, Rich Miner, Nick Sears and Chris White. Initially, their aim was to develop an advanced operating system for cameras. However, they found that their target market was too limited and therefore the company diverted its efforts towards producing a smartphone operating system that would rival Symbian and Microsoft Windows Mobile.
In July 2005, Google acquired Android Inc. and Rubin, Miner and White stayed at the company after the acquisition. At Google, the team led by Rubin developed a mobile device platform powered by the Linux kernel. Google marketed the platform to handset makers and carriers on the promise of providing a flexible, upgradeable system. The first commercially available smartphone running Android was the HTC Dream, released on October 22, 2008. Since 2008, Android has seen numerous updates which have improved the operating system, added new features and fixed bugs. As of January 2018, the latest version of Android is Android 8.1 codenamed Oreo.
Introduction to Android Versions
Android 1.0, the first commercial version of Android, was released on September 23, 2008. The next version of Android, Android 1.1 was released on February 9, 2009. These two versions of Android did not have any code names. All of the later versions of Android have specific code names.
|Code Name||Version No.||Initial Release Date||API Level||Security Patches|
|N/A||1.0||23 September 2008||1||No|
|N/A||1.1||9 February 2009||2||No|
|Cupcake||1.5||27 April 2009||3||No|
|Donut||1.6||15 September 2009||4||No|
|Eclair||2.0 – 2.1||26 October 2009||5 – 7||No|
|Froyo||2.2 – 2.2.3||20 May 2010||8||No|
|Gingerbread||2.3 – 2.3.7||6 December 2010||9 – 10||No|
|Honeycomb||3.0 – 3.2.6||22 February 2011||11 – 13||No|
|Ice Cream Sandwich||4.0 – 4.0.4||18 October 2011||14 – 15||No|
|Jelly Bean||4.1 – 4.3.1||9 July 2012||16 – 18||No|
|KitKat||4.4 – 4.4.4||31 October 2013||19 – 20||No|
|Lollipop||5.0 – 5.1.1||12 November 2014||21 – 22||Yes|
|Marshmallow||6.0 – 6.0.1||5 October 2015||23||Yes|
|Nougat||7.0 – 7.1.2||22 August 2016||24 – 25||Yes|
|Oreo||8.0 – 8.1||21 August 2017||26 – 27||Yes|
You can read more about Android version history in this Wikipedia article.
As you can see, the above table on Android version history specifies API level for each version of Android. What is an API level? In simple terms, an API level is a number assigned to a specific version of Android. Every version of Android has its own API level. While developing Android apps, you have to specify the target API level and the minimum API level.
- Target API Level – The version of Android for which you are developing the app. Usually this is the latest API level. Your app may work on other versions as well. However, it will work best on devices which have the same API level of Android as specified by you. For example, if you set your target API level to 27, it implies that your app targets Android Oreo. It will work on previous as well as future Android versions. However, it has been designed to make full use of the features of Android Oreo. Some features might not work on devices with other versions of Android.
- Minimum API Level – This is the lowest version of Android supported by your app. In other words, this app cannot be installed on a version of Android older than the specified one. For example, if you set your API level to 19, it implies that this app cannot be installed on devices with an older version of Android. In other words, Android KitKat is the lowest version of Android supported by your app.
Introduction to Android Studio
Android Studio is currently the most popular IDE for Android app development. Previously, Eclipse was the IDE of choice for Android app development. To start developing Android apps, you need to install Android Studio which you can download from here. You should download and install the latest stable build of Android Studio. As of January 4, 2018, the latest stable build is 3.0.1 which was released on November 2017.
Developing and testing apps
After you have installed Android Studio, you can start developing your first Android app by creating a new project in Android Studio. When you start developing your app, you need to test it. For testing, you need an android device (smartphone or tablet) or an emulator. You should test your app on as many devices as possible. This helps you ensure that your app works properly on all types of smartphones and tablets with various configurations. Since the range of available Android devices is very wide, ranging from 4-inch smartphones to 10-inch tablets and with various processor speeds, amount of RAM etc., it is often impractical and expensive to buy so many devices. Instead of buying lots of devices, you can use emulators.
Introduction to Android Emulators
An Emulator is a virtual device which looks and works like a real smartphone/tablet. It is actually a program which emulates the configuration of a real device. You can create emulators of various configurations (at ZERO cost). A typical emulator looks like this –
As you can see in the above image, an emulator looks like a real device. In this case, it emulates a Galaxy Nexus smartphone with Android Marshmallow . You can use your mouse to click and keyboard to type inside this emulator. You can use emulators like this for testing almost all features of your app. Please note that emulators have some disadvantages. For example, emulators are usually slow. Also, they cannot be used for testing some features of Android apps since they are not real devices and do not have the real hardware for performing those tasks. I’ll discuss more about emulators later.
Deploying Android Apps
Deployment is the last stage of Android App development. At this stage, your app is finally ready to be installed on end users’ devices. To do this, you need to first generate the apk file for your app and sign it digitally. After this, you need to distribute it. You can distribute your app either manually (e.g. through your website) or by listing it on an appstore like Google Play or the Amazon AppStore. If you wish to monetize your app, there are several ways to do so. For example, you may sell it for a fixed price or embed advertisements inside your app. You also have the option to use in-app purchases. I’ll discuss more about App Deployment later.
Recommended resources for learning Android App Development
There are several ways to start learning Android App Development. There are several books, websites and online tutorials to help you learn. If you need a book, I’ll recommend Murach’s Android Programming (2nd Edition). If you’re looking for an online tutorial/course, I’ll recommend Programming Mobile Applications for Android Handheld Systems by Coursera. Apart from all these resources, the official Android Documentation is the most useful resource you could ever find. I wish you a happy Android development experience.