Android has tremendous growth across the globe with a diverse community. It's open to everyone: designers, developers, and device makers. But do you know how it works? In this Android tutorial, you’ll learn about Android fundamentals like architecture, features, versions, installation, and more.
Android is a leading mobile operating system worldwide, having a global market share of over 71%, leaving the competitors like Apple’s iOS, windows, etc., far way behind. It runs on a wide variety of platforms, and its powerful features contribute to its success.
This Android tutorial/Android Studio tutorial covers basic to advanced-level Android concepts and is developed for both beginners and experienced.
Android is a Linux-based operating system designed especially for mobile-based touch screens such as smartphones and tablets. This operating system has developed a lot in the last 15 years and soon became the most popular operating system for mobile apps with its advanced features. It’s the operating system inside 2.5 billion active devices. From stunning tablets to 5G phones, Android powers them all.
Open Handset Alliance developed Android and was later commercially led by Google. Android is based on the Java programming language, and if you possess knowledge of it, it’s easy to learn Android application development.
If you would like to Enrich your career with an Android Certified Professional, then visit Mindmajix - A Global online training platform: "Android Certification Training” Course. This course will help you to achieve excellence in this domain. |
Android is a mobile-based operating system based on Linux Kernel’s modified versions and other open-source software. Android is free to use and open-source software. Android is licensed under the Apache License, and its source code is Android Open Source Project (AOSP).
Android was released on 23 September 2008, and Android 11 is the latest version.
The history of Android begins in Oct 2003. Four members, namely Rich Miner, Chris White, Nick Sears, and Andy Rubin, found Android in Palo Alto, California.
In 2005, Google acquired Android. Since then, it has been a subsidiary of Google Incorporation.
The codenames of Android ranges from A to P currently. API Level is an integer that distinguishes the framework API revision offered by a version of the Android platform. The following table shows the sequence of Android versions, along with their codenames and supported API levels.
Version | Codename | A2PI Level |
11 | Android11 | 30 |
10 | Android10 | 29 |
9 | Pie | 28 |
8.1.0 | Oreo | 27 |
8.0.0 | Oreo | 26 |
7.1 | Nougat | 25 |
7.0 | Nougat | 24 |
6.0 | Marshmallow | 23 |
5.1 | Lollipop | 22 |
5.0 | Lollipop | 21 |
4.4 - 4.4.4 | KitKat | 20 |
4.3.x | Jelly Bean | 19 |
4.2.x | Jelly Bean | 18 |
4.1.x | Jelly Bean | 17 |
4.0.3 - 4.0.4 | Ice Cream Sandwich | 16 |
4.0.1 - 4.0.2 | Ice Cream Sandwich | 15 |
3.2.x | Honeycomb | 14 |
3.1 | Honeycomb | 13 |
3.0 | Honeycomb | 12 |
2.3.3 - 2.3.7 | Gingerbread | 11 |
2.3 - 2.3.2 | Gingerbread | 10 |
2.2.x | Froyo | 9 |
2.1 | Eclair | 8 |
2.0.1 | Eclair | 7 |
2.0 | Eclair | 6 |
1.6 | Donut | 5 |
1.5 | Cupcake | 4 |
The Features of the Android operating system are listed below:
Type
|
Feature and Description
|
General
|
Supports SMS and MMS through messaging feature.
|
Android supports an exciting feature called auto-correction for word misspell and dictionary to add, edit and remove words.
| |
Voice-based features like calling, texting, navigation, etc., are supported on Android 2.2 onwards.
| |
The multi-touch is made available in handsets such as the HTC Hero.
| |
Multi-tasking of apps is available.
| |
Android supports Screen capture, TV recording, and video calling.
| |
Supports multiple languages
| |
Connectivity
|
Android supports connectivity technologies like Bluetooth, Tethering, GSM/EDGE, CDMA, LTE, UMTS, EV-DO, IDEN, NFC, and WiMAX.
|
Wi-Fi Hotspot allows you to discover and pair apps directly over a high-bandwidth peer-to-peer connection.
| |
Media
|
Android supports various media formats, including WebM, H.264, H.263, HE-AAC, AAC, and more.
|
Android supports USB flash drives and USB HDDs, and USB-OTG cables to allow usage of external storage.
| |
Other
|
The platform works for various screen sizes and can potentially connect to any external screen.
|
You can work with J2ME via third-party applications (Java).
| |
Allows instant apps creation
| |
Android apps are written in HTML (Native apps).
| |
SQLite, a lightweight relational database, is used for data storage purposes.
| |
Android Beam allows you to share just by touching two NFC-enabled phones together instantly.
|
The best thing about Android is that anyone can set up an Android environment on any operating system.
Another exciting thing is that all the tools used for developing applications are freely available and downloaded from the web.
Before you get started with your Android application programming, make sure you installed the following software’s:
JDK (Java Development Kit)
Android Studio
Once it's there in your system, go ahead and follow the process to install the latest Android Studio version. Go to the link: https://developer.android.com/studio and click on download Android Studio.
For More Info: Installation of Android |
An android operating system is a software stack of different layers, in which each layer groups several programs together. Each layer in the architecture provides various services to the layer just above it.
The below diagram shows the major components of the Android platform.
Following are the different layers in the Android software stack:
Linux Kernel Layer
Hardware Abstraction Layer (HAL)
Native Libraries Layer
Android Runtime
Java Application Framework Layer
System Apps Layer
The foundation of the Android platform is a Linux Kernel. Its importance stems from the fact that it supports the underlying functionalities of Android Runtime (ART), security settings, memory management programs, shared libraries, other hardware drivers, and more. With the evolution of Android, the Linux Kernels it runs on have evolved too.
The below table highlights different Linux Kernels versions:
Android Version
|
Linux Kernel Version
|
1.0
|
2.6.25
|
1.5 (cupcake)
|
2.6.27
|
1.6 (Donut)
|
2.6.29
|
2.2 (Froyo)
|
2.6.32
|
2.3 (Gingerbread)
|
2.6.35
|
3.0 (Honeycomb)
|
2.6.36
|
4.0.x (Ice Cream Sandwich)
|
3.0.1
|
4.1./4.2 (Jelly Bean)
|
3.0.31
|
This layer provides standard interfaces that exhibit device hardware competencies to the higher-level Java API framework. HAL consists of different library modules, each of which applies an interface to the hardware component’s particular types.
Another layer in the architecture is Android’s Native Libraries. A library passes a set of instructions to the device for handling different data types.
Open-source libraries include Surface Manager, SGL, Media Framework, Free Type, WebKit, SQLite, and more.
It’s located on the native libraries layer and includes a set of Java libraries. It provides a unique component called Dalvik Virtual Machine, a Java Virtual Machine’s type specially optimized for Android.
Additionally, the Android runtime supports a set of core libraries enabling android app developers to write apps in the Java programming language.
The entire feature-set of Android OS is available through APIs written in Java programming language. They form the core building blocks of Android application development. Essential blocks of application framework are:
System apps are at the topmost layer of the Android stack. They function both as applications for users and provide critical capabilities that developers can access from their app.
An Android component is simply a piece of code that has a well-defined life cycle. The core building blocks or fundamental components of an Android application are
An activity is a class that is represented as a single screen and considered as an entry point to users. Usually, an app contains many screens, and each screen extends the Activity() class.
An app can have different activities, and each one is independent of one others. For example, a Grammarly start page where you enter your email and password to log in acts as an activity.
To implement an activity, extend the activity class in your subclass as follows:
public class MainActivity extends Activity {
//code
}
An Android activity can have four states: Running, Paused, Resumed, and Stoped during its entire life cycle.
To describe each activity in each of its four states, Android supports callback methods. There is a sequence of callback methods that starts up an activity and break down into different methods, as shown in the diagram above:
Syntax:
@Override protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
...
}
onStart() - This is the second callback and is called when the activity becomes visible to the user.
Syntax:
@Override protected void onStart()
{
super.onStart();
...
}
Syntax:
@Override protected void onResume()
{
super.onResume();
...
}
onPause() - This callback is invoked when an activity doesn’t receive any user input and goes on hold.
Syntax:
@Override protected void onPause()
{
super.onPause();
...
}
Syntax:
@Override protected void onStop()
{
super.onStop();
...
}
Syntax:
@Override protected void onDestroy()
{
super.onDestroy();
...
}
Syntax:
@Override protected void onRestart()
{
super.onRestart();
...
}
A service is a component used to perform long-time running operations in the background. It keeps updating activities, data sources, broadcasts intents, and even conducts the tasks when apps are not active.
An example of service is browsing the internet while still listening to music(usage of another app).
Extend service class in a subclass to execute services:
public class MyService extends Services {
//code
}
A service can take two states, namely Started and Bound.
A service lifecycle has specific callback methods to monitor changes in the services state.
Callback | Description |
onStartCommand() | This callback is invoked when another component invokes the service started by startService(). |
onBind() | When another component wants to bind with the service by calling bindService(), this callback is invoked. |
onUnbind() | When all the clients have disconnected from the interface, this callback is called. |
onRebind() | When new clients are connected, we use this callback. |
onCreate() | When the service is first created using onStartCommand() or onBind(), this method is called. |
onDestroy() | When service is destroyed and no longer used, this method is invoked. |
Content Provider is a component that allows data sharing from one application to others on request, and the methods of the ContentResolver class handle those requests. It hides the database information and reads and writes private data of an application that is not shared.
Without content providers accessing data from other applications would become a mess.
Extend ContentProvider in your subclass, to implement this:
public class Provider_Name extendsContentProvider {
//code
}
Broadcast Receiver is a component that responds to broadcast messages from the same system or another application. These messages are called events or intents. A broadcast receiver is used by the app when they perform execution based on system events. It acts as communication between the Android operating system and applications.
Broadcasts can also be delivered to apps that are not running.
Extend BroadcastReceiver to your receiver, to implement this:
public class Broadcast_Name extendsBroadcastReceiver {
//code
}
The manifest files describe basic information about your app to the Android build tools and operating system. It performs various tasks such as:
Some additional components of the Android Application:
1. Intents
Android intent is an abstract description of an operation to be performed. It is used to transfer data between activities and start a new service, and display a list of contacts in ListView. For communication between android components, intent works like an inter-application message passing framework. An example of intent is the camera app sends an intent to the system when the user wants to share a picture.
2. Widgets
Android widgets are variations of Broadcast receivers and fundamental aspects of home screen customization. They present data and allow users to implement actions on them. Types of widgets that Android application components support are information widget, collection widget, control widget, and hybrid widget.
3. Views
The basic building block of Android is View, which is responsible for event handling and drawing. Some of the views are ImageView Button, ImageButton, EditText, and CheckBox.
4. Notifications
Informs the user when the app is inactive or not visible.
5. Fragments
A fragment is a piece of an activity that enables a more modular activity design. Users can join more than one fragment in a single activity, and these fragments can be reused in various activities. It generally contains Views and ViewGroups inside them.
6. Layout XML Files
It’s the structure of the user interface in the application. Android supports various types of layouts.
7. Resources
To define string values, texts, etc., Android uses resources.
Related Article: Top Android Interview Questions and Answers |
Conclusion
With this, we have come to the end of this Android Tutorial. Nowadays, most of them own smartphones and apps where the majority of their time is spent. In fact, billions of Android apps were downloaded every year, assuring that the Android career is a stable one with lots of opportunities.
If you want to develop an Android App, consider getting started with Mindmajix’s Android Certification Training course. The course is aligned with Google’s Associate Android Developer (AAD) Exam and covers everything from scratch.
Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:
Name | Dates | |
---|---|---|
Android Training | Dec 07 to Dec 22 | View Details |
Android Training | Dec 10 to Dec 25 | View Details |
Android Training | Dec 14 to Dec 29 | View Details |
Android Training | Dec 17 to Jan 01 | View Details |
Madhuri is a Senior Content Creator at MindMajix. She has written about a range of different topics on various technologies, which include, Splunk, Tensorflow, Selenium, and CEH. She spends most of her time researching on technology, and startups. Connect with her via LinkedIn and Twitter .