[INTRO MUSIC PLAYING]
Hello, everyone. I'm Lalit Singh.
I welcome you all
in this Android Developer Fundamentals.
In this school, you are going to learn about
Android application development from very scratch
This particular slide,
that contents in the introduction to Android.
This content, this will tell you about Android ecosystem,
The Android platform architecture,
Android versions, challenges which we face
in Android application development,
and the basic building blocks of Android itself.
[REMOTE CONTROL SOUND]
First of all, let's just talk of what exactly is Android.
Android is an operating system, you get this right.
But is that all it is?
it is actually a stag base,
Linux come under the hood, there is a Linux kernel.
What is Linux kernel? We all know.
It is it act as an interface
between your hardware and your software.
So here we are using Linux kernel,
not Mac, not Windows.
as Android is an open-source environment,
an open-source ecosystem.
What are other things?
like you can have a cool user interfaces,
like touch screen sensors,
and we all know,
Android is covering more than 80% market right now
when it comes to smartphones.
And, we we have different ways to connect your Android now.
Not just as smartphones.
We have cool Android watches,
or we call it Android wears,
TVs and Android Autos,
so in your cars and right gears.
And there are more than two million Android apps
in the Google Apps, Play Stores now
The cool thing, the best thing
which the developers is going to like it.
Android is highly customizable.
So, if you have a particular device,
you can move your Android according to your own will.
So, when it comes to user interaction,
what exactly, what are different uses of interaction?
You can swipe, you can tap, you can pinch,
zoom in, zoom out.
We have a watchful keyboard here
which gives you pretty much cool features,
like numbers, typing numbers, collector, emojis,
all those cool faces you see,
you get from your watchful keyboard,
and support to Hydro CardViews,
like Bluetooth, USB controllers,
WiFi adapters and all
So all these things, all these cool hings you can attach,
and you can work on with your Android device.
So... Android, when we talk about Android sensors,
and how exactly those senses are connected to play.
We have sensors
like proximity sensors, accelerometer sensors
So all these sensors work.
You must have seen when you rotate your device
in your games and all.
when you rotate your device, your object will clear rotates.
Hopefully that is happening because there are sensors
already placed inside your Android device.
and your Android operating system has the sensor
to connect with your own application.
So we can position into a map on a particular location,
and we can do the navigation,
and we can even steer a virtual car or toy.
So all these things can be done
with the help of your Android operating system.
so when we talk about Android, we always see that home screen.
OK, that home screen is what?
home screen itself is an application
which can actually contain other application.
Right, we see icons there,
launcher icons for apps.
Self-updating widgets are there, multiple pages are there.
We also see that "OK Google."
So all these things are nothing but your--whatever you see
on your screen.
Your home screen itself represents application,
and your home screen is known as activity
which we are going to discuss in further chapters--
what is exactly an activity?
But for now, understand that the screen itself
is actually a part of your application.
so If I have to give you some examples,
You must have came across these pretty famous applications:
Pandora, a great music player;
Pokemon Go which is a great hype right now;
and Facebook Messenger.
So you can build all these cool apps,
once you learn about
how exactly are the basic
mechanism of open director.
So we can build all these apps.
So how exactly
you are going to develop your Android applications?
To do that, you need Android SDK.
Android SDK is known as Software Development Kit.
This is specifically for Android application developer.
and for that, the prerequisites are the Java.
We are going to go through all the prerequisites
which you need. Now for that in a bit.
But as of right now, let me tell you
what exactly are the different tools
which you will be getting here.
you will be getting development tools
like debugger,monitors,editors there will be libraries.
Here, libraries will have variables, maps,
and there will be the documentation
if yo need any help.
We have the documentation,
everything jotted down in android.developers.com,
and there will be samples codes also.
and the best thing or cool thing
about when we are developing Android application development
is you get emulators virtual device,
so you don't even need to get a real device
for the testing purpose.
You get a virtual device.
And anything you want to develop.
anything, any application you download can be tested here,
virtual devices, which will give you exactly the field
of a real device.
So when we talk about Android Studio,
this is how your Android Studio looks like.
Most of you are already familiar with Eclipse or any other IDE,
There's not much change,
but when we install our Android Studio
and when we get to that Android Studio IDE.
We'll talk more about it but let me tell you
what exactly Android Studio beforehand provides you.
It provides you an environment where you can develop.
It provides you with real running features,
and debugging your app, testing
and all the packages and build.
You can monitor your performance.
You can monitor your memory usage,
and all those things and the virtual device,
which was I've just talked about.
Yet all those emulators,
rather it is running in android 6.0, or 5.0,
you can get them with the help of your Android device.
You have different views--
or if I should call it...
we call it project hierarchy also,
so you can always go through different ways
of viewing your whole project.
So we will go through that all is going to be.
When we see the whole Android Studio in action,
and we have a visual editor,
so you don't have to worry about
Do I need to learn the coding, specifically for designing a UI?
No! that has been taken care for you by visual editor--
or you can say the visual Layout Editor.
You just have to drag and drop.
You need to know what you really need to...
What you really want to design,
and that's it.
They are of use for you.
They are of use. You just have to drag and drop.
This is Google Play Store.
So like I said,
you need to create an account which was $25, lifetime,
which will give you access of official Play Store,
or you can say a market,
where you can publish you app.
And, Google Play Store is an official market
where you can publish all your apps,
and it will be provided all over the world.
People can see.
And, that's where you will be publishing all your application.
See, there are ways you can get this application to the people
by providing them with May Land,
providing them with USB drivers and all,
but it will cover the whole market.
So we have this market here,
specifically for publishing our apps,
all that would updated in majority or large-scale.
So, before we get more into Android.
We need to know what exactly or how exactly
your Android have been.
What is the internal structure of the architecture of Android?
Let's just understand what exactly Android looks like
from inside.
If you remember, I told you in the starting,
Android is a stack-based operating system
So what did I mean by that?
So stack-based means it is layer upon layer.
so the layers are stacked, like layer upon layer.
So when we talk about stack-based.
At the very bottom we have Linux kernel.
Then, we have AGL hardware of the abstraction layer.
Then above that, we have a layer in which contains two things
that is native C&C++ Libraries,
and Android Runtime.
And then we have Java API Framework.
Above that we have System Apps or User Apps.
so let's just go through with them, each one of them
very briefly.
So see here, when we talk about system apps or user apps,
these are the apps which comes with your application in them.
System apps are inbuilt application
to make your call application,
Your user application are your Google Chrome application.
So all those apps which comes within your device
when you purchase your device for the very first time
Those are our system apps.
User apps, which you install separately
from Google Play Store.
For example, What's Up.
For example, Facebook.
For example, any game
which you are installing from Google Play Store.
Or you can develop your own app,
and install it in your device also.
So those are known as user apps. Good!
so, next is Java API Framework.
So this is an API,
which we Android developers would be working rigorously,
because all the APIs which we need
for our application development
is inside this Java API framework.
This is also known as Android SDK,
so all those developers which work in this layer,
are also known as SDK developers.
Android SDK developers.
So if you want to design an application,
you will make use of all these classes.
So we have view classes here
for designing your layout in Android,
any UOM, UIUC, any layout of any application you see.
It has been designed from this particular group, API.
You have notification manager.
All the notification which you see.
All cool notification
while you are using your social applications and all.
They are being designed from this API only.
Your activity manager, all the screens itself,
are being designed from this.
Content providers, sharing of your data,
again, from this.
So there are a lot more classes which are there in Java API,
and we are going to make use of all these classes
when we go and start making our applications.
Again, next is our Android runtime (ART).
What exactly is Android runtime (ART)?
This is where all our application runs.
So, inside your Android Runtime, there are compilers
like DVM or ART.
All the new devices now use ART.
Before Android 4.4, we used to have DVM,
but ART was introduced in 4.4.
And now,
all the higher versions use this.
Android 7.0, 6.0...,
They are using ART,
So we will talk ART also,
when we get into actual difference,
between the Gradle system and Nicholasville system.
So just know for now,
Android Runtime is the place
where all your application come and run.
C and C++ libraries also known as native libraries.
This is the section where all your system libraries
are being placed and they are returned in C++.
Now we have developers for this particular libraries also,
but they are known as an NDK developers,
Android NDK developers, known as
Native Development Kit developers.
Now as for this course,
We will be working on SDK developers,
but they're there are developers
which work on directly C and C++.
Now what exactly C and C++ libraries contain?
this will contain all your high-end libraries.
like graphic libraries, OpenGL ES,
your Secure Sockets Layer (SSL),
and your Webkit-OS.
So all those libraries which are already hard to write
in your Java,
and easy to write in C and C++,
so you will be using inside C and C++,
or the native library section.
Next is Hardware Abstraction Layer.
Now this layer has been particularly written
are putted reaching out, in order to access your hardware
from your application itself.
So there are pretty fine methods,
which are there to use,
which are provided to you to access.
For example, if you want to use camera application,
or if you want to open up a camera or Bluetooth or WiFi,
there is already a hardware abstraction layer methods,
predefined methods, which are defined in hardware.
Actually, you just have to use those methods
in your application,
and you will get the access of your camera.
So next is our Linux kernel.
Now Linux kernel acts as any kernel which you see
in any other operating system.
It handles your threading,
it handles all your low-level memory management,
it handles your resource management,
it handles all your security features,
and it's also induce your drivers.
Like if somebody wants to call camera application,
he have to first go to HAL, we will like to discuss,
then HAL turn will go in turn,
will go to the drivers which are written
in your Linux kernel,
which are there in your Linux kernel
and it will give you the access of your actual camera hardware.
And the Linux kernel has the supreme right
in Android application development.
For example, let's say,
if you see... whenever you see that
your application is getting stuck,
or application is not responding,
you must have seen a dialog box appearing up right away,
and it is saying, "application not responding."
So who is actually popping up that dialogue
is actually Linux kernel.
At any point of time Linux kernel sees
that your any application is going,
is taking too much resources,
and is not allowing any other application to run freely,
so Linux kernel have the right to kill that application.
Of course, it will ask you in the starting
that this particular application is taking this much space
or this much memory,
and if you want to wait
for this application to respond or not?
But if it really goes...
If the memory really goes out of...
if that application takes too much memory,
and it really goes out of the memory.
and then your Linux kernel has the right
to restart your device itself.
So next, you see all these cool Android versions
Well, Android start from Android 1.0
but all these are fun versions you can see over here,
that which have cool names.
The leaders one you see is Nougat,
and there is a very interesting thing here
which you will see that each cool name,
or each Android version name starts
in an alphabetical order: H, I, J.
So each code name is a dessert name.
and the one more thing
which I really want to discuss here is API level.
So are each version is working on a particular API level,
and API level are application for programming interfaces.
So they are set of classes which are being provided
at each Android version, which you will be using
to develop your Android application
at that particular or for that particular version.
Like if I want to develop an application for KitKat,
I will be using the API 19 to 20.
If I'm developing for the latest version,
so it will be API level 24.
When I want to develop an application,
I really want to keep this in mind
that there is always a maximum level of API.
That is the latest one
so that old and new users can make use of my application.
Plus, I also want to set a minimum version of Android
so that even the users
who doesn't have the latest API right now,
old version right now in their device,
they can also still use it.
So we'll talk about it more
when we start making an application.
We'll set a minimum version there,
and we'll set a maximum version there,
and you will see that in your application yourself.
Now how exactly...
How application development goes here?
Well, first thing first.
Android is not just one screen, there are so many screens,
in which you see you click on one screen,
you get to next screen.
So we will see all those
how exactly we design one screen,
how exactly we go to next screen,
but what exactly we use under the hood?
We use Java programming.
That's right, Java programming, plus XML.
But don't worry about XML.
we don't have to be an expert on XML.
but you do need to know
how exactly we use XML to design our layouts.
So there will be a complete go-through for these XML files,
but also when we will also be doing in our UI design.
And of course, you will be needing your Android SDK
That is your software development kit.
And the Android libraries.
And now these libraries give you some extra features
which you are not having as of right now in your SDK,
so this particular libraries will give you..., for example,
the material design.
Material design is the newest addition in your Android 5.0,
and if you want to make use of your material design
in the versions below your 5.0,
you won't have the access.
For that purpose, we have Android libraries.
To be more precise, we have AppCompat libraries for that,
which will give you the access
of that particular material design feature
even in your lower versions.
So we'll talk more about it
when we get into the development part.
And we have Android Runtime Virtual Machine here.
Now all you can see ART which is being, you know...
Your Runtime Machine is executed at their ART,
which will be very helpful
when you are running your testing of your application.
So what are the challenges you face
when you are doing your application with them?
Most of it you're going to feel that
that you are designing for a particular screen
and that UI is whatever you have for that particular screen,
is not looking the same
in that different screen resolution
or in different screen size.
So we have a way to fix that also.
And the performance.
Most of the time, if your app is using all those classes
which are using extensive use of graphics,
networking and internet and all.
There might be a chance that your application
is taking long to open,
especially in the case
where your device is not high-tech device,
your processor of the device is not that much powerful.
So you will face the challenge at the performance level also.
So you can always...
You know what rectify those performance errors,
and you can make your application faster.
That also ... you will see in best practices of performance.
Security. You can always keep more security
or encrypt your application
whenever you know with the ProGuard files
which you have in your Gallery,
in your Android application development,
in your application itself,
so you can always make your application
more securely with your ProGaurd files.
Compatibility.
Now that's an issue or challenge which you will be facing a lot.
That's because you will be targeting
for a particular version.
You will be targeting a majority of people.
That's what our aim is.
So that whenever we develop an application,
that can be used by a majority of people.
But we we cannot expect our application to run
in each and every version.
Like, let's say,
I want to create an application which will run in 2.3 also,
but if I'm going all the way down to 2.3,
I might have to sacrifice many features
which I really want to add
in my Android application development,
which would give a real look and feel
to my Android application development.
But, that's not going to happen,
because you are going all the way
down to your older version of 2.3.
So we have to make a balance here.
We have to target,
or we have to put a minimum Android version
for our application development,
so that I can code for a majority of people.
So for example, right now
most of the people of the world,
you can see that
they are at least using Ice Cream Sandwich.
There will be very less percentage of people
who would be using 2.3.
So we are going to skip that particular mob,
and we are going to target our application development
to 4.0 and above.
So this will give us a complete majority of people,
which we really want to target.
Next, marketing.
Now marketing, of course,
it totally...it's upon you
that how exactly you want to market.
Marketing can be expensive,
if you want to put all the advertisement
at all of the place.
It can be expensive also,
but it can be cheap also.
I mean, you can just add maps
There are libraries for that also,
so you can add those.
but it all depends upon
how well you want to market your application.
So those are few challenges,
which you will be facing
when you will be creating any application.
So we would like to reduce those challenges also.
So when we talk about Android building blocks.
So what are those building blocks?
Android is not all about Java.
and Java is one thing you will be doing.
You will be putting all the functionality
with the coding as a java language,
but it's not all about Java.
There're UIs, there are layouts,
There are images, They are XML files.
So all these things are known as resources.
So resources will be there,
along the way to help you out to design your application.
Plus, there will be component, ,activities, services,
helper classes, model classes and the Manifest file.
Now Manifest file is one of the most important files
in your Android application development.
It is the very first file
which your Android device sees,
whenever you download an application
It gives you the information about your application itself.
What your application contains.
How many screens it contains.
What other services it contains.
So all the information is being written
in your Manifest file.
It's kind of configuration files
which you see in your any other application.
The next thing which you really want to look at is
is your APK.
Now this is the end product which you get
whenever you are developing,
we are done with your application development.
This APK file is the one which you will be uploading
to your Google Play Store,
and this is the file
which everyone out there will be downloading,
and this is your application as a whole.
So next, components of Android.
Now whatever you see all those application out there.
They are built with these four components only.
Nothing is outside these components in Android.
So first is activity.
What is an activity?
Activity is anything which you see on your screen.
Even your lock screen is an activity.
Your home application,
you see the very first home screen is an activity.
so anything which you can see on your screen,
and a user can interact with it is an activity.
Services.
Services doesn't have UI.
Unlike your activity, they run in the background
For example, your music.
You play your music and your music start playing,
and now you can switch to other applications.
and still, your music is playing in the background.
So where exactly are music is being played? In the service.
so a service doesn't need a UI
unlike activity, so it runs in the background.
Content provider.
In Android, two applications cannot share data,
because of the Linux kernel
which provides you a sandbox mode under the hood.
So how can you do that, too?
How can you share the data?
Well, that's where content provider comes in.
Content providers are the mechanism
or you can say classes
which help you share data
between two applications.
Broadcast receivers.
Broadcast receivers are the classes
which listens for a particular set of messages.
For example,
if somebody sends you a message or WhatsApp
or any other application.
Now there will be a BroadcastReceiver
contained in that application
who listen for that particular message.
the message is being transmitted to the entire device,
like only WhatsApp application
is the one who will pick that up,
but other applications BroadcastReceiver
will ignore that particular message.
So you can think Android as a hotel,
Your app is your guests.
Your Android system is the hotel manager.
Now there are certain services which you request.
You can involve them with the help of intents,
which we are going to go through in further slides.
Now there are services which require your presence.
For example, let's say
you want to register for your hotel registration.
So that requires your presence,
so that's what of activities like your UI.
Or there are services which don't require your presence.
For example, laundry.
So that you can compare with your services.
Now you get a call that your package has arrived.
Now that's you can compare with your Broadcast receiver.
Then you get the access of the city map.
All these access which you are getting,
you can correlate it with the content providers.
Here are a few more things to give you extra information
regarding what we have cover.
We're going to go more deeper together in further slides.
So next, we're going to cover introduction to development
in the Android.
[OUTRO MUSIC]