WEBVTT

00:01.440 --> 00:07.530
So far in this course, steps have been taken to set up an environment suitable for the development

00:07.530 --> 00:10.160
of Android applications using Android studio.

00:10.170 --> 00:16.380
An initial step has also been taken into the process of application development through the creation

00:16.410 --> 00:19.020
of Android Studio Application Project.

00:19.050 --> 00:25.650
Before delving further into practical matters of Android application development, however, it is important

00:25.650 --> 00:31.230
to gain an understanding of some of the more abstract concepts of both Android software development

00:31.230 --> 00:33.960
kit and Android development in general.

00:34.140 --> 00:41.850
Gaining a clear understanding of these concepts now will provide a sound foundation on which to build

00:41.850 --> 00:43.050
further knowledge.

00:43.050 --> 00:49.230
So starting with an overview of Android of Android application in this course and continuing to in the

00:49.230 --> 00:56.640
next few lectures of this course, the goal is to provide a detailed overview of the fundamentals of

00:56.640 --> 00:58.140
Android development.

00:58.170 --> 01:01.260
My name is Stephan and let's get started with our lecture.

01:13.410 --> 01:21.930
The Android software stack on Android is a structured in the form of software stack comprising applications

01:21.930 --> 01:26.700
and operating systems, runtime, environment, middleware services and libraries.

01:26.970 --> 01:34.920
This architecture can perhaps can best be represented visually as outlined in this screenshot.

01:35.100 --> 01:42.060
Each layer of the stack and the corresponding elements within each layer are tightly integrated and

01:42.060 --> 01:48.720
carefully tuned to provide the optimal application, development and execution environment for mobile

01:48.720 --> 01:49.500
devices.

01:49.530 --> 01:56.610
The remainder of this course will work through the different layers of this Android stack and starting

01:56.670 --> 01:59.490
the bottom with the Linux kernel.

02:00.190 --> 02:02.920
So let's get started with the Linux kernel.

02:03.600 --> 02:08.310
Linux kernel positioned at the bottom of Android software stack.

02:08.340 --> 02:15.300
The Linux kernel provides a level of abstraction between the device hardware and upper layers of Android

02:15.300 --> 02:19.540
software stack based on Linux version 2.6.

02:19.560 --> 02:26.940
The kernel provides a preemptive multitasking, low level core system services such as memory process

02:26.940 --> 02:28.470
and power management.

02:28.470 --> 02:35.580
In addition to providing a network stack and device drivers for hardware such as device displays, WiFi

02:35.580 --> 02:36.900
and audio.

02:37.230 --> 02:47.430
The original Linux kernel was developed by in 1991 by Linus Torvalds and was combined with a set of

02:47.430 --> 02:55.200
tools, utilities and compilers developed by Richard Stallman at the Free Software Foundation to create

02:55.200 --> 02:59.430
a full operating system referred to as Genie or Linux.

02:59.460 --> 03:07.660
The various Linux distributions have been derived from the basic underpinnings such as Ubuntu and Red

03:07.690 --> 03:09.400
Hat Enterprise Linux.

03:09.430 --> 03:15.990
The Kali Linux and the Ubuntu and other Linux based systems.

03:16.000 --> 03:22.630
And it's important to note, however, that Android uses only the Linux kernel.

03:22.660 --> 03:31.030
That said, it is worth noting that the Linux kernel was originally developed for use in traditional

03:31.030 --> 03:33.610
computers in the form of desktops and servers.

03:33.640 --> 03:41.260
In fact, Linux is now most widely deployed in mission critical enterprise server environments and it

03:41.260 --> 03:48.160
is a testament to both the power of today's mobile devices and the efficiency and performance of the

03:48.160 --> 03:54.370
Linux kernel that we find this software at the heart of the Android software stack.

03:55.680 --> 04:03.930
In addition to a set of standard Java Kotlin Development libraries, this providing a support for such

04:03.930 --> 04:10.590
general purpose tasks such as string handling, networking and file manipulation.

04:10.620 --> 04:15.930
The Android development environment also includes the Android libraries.

04:16.260 --> 04:21.810
These are a set of Java based libraries that are specific to Android development.

04:21.840 --> 04:27.840
Examples of libraries in this category include the application framework libraries in addition to those

04:27.840 --> 04:34.740
that facilitate user interface building, graphics, drawing and database access.

04:34.740 --> 04:40.080
And on the screen you are seeing some of the most used libraries in Android.

04:44.020 --> 04:45.700
The Android runtime.

04:45.700 --> 04:52.960
Core libraries, as outlined in the preceding section, are Java and Kotlin based and provide the primary

04:52.990 --> 04:56.050
APIs for developers writing Android application.

04:56.170 --> 05:03.340
And it's important to note that, however, that the core libraries do not perform much of the actual

05:03.340 --> 05:11.770
work and are in fact essentially Java and Kotlin wrappers around a set of C and C plus plus based libraries.

05:11.770 --> 05:20.620
So when making a calls, for example, the Android OpenGL library to drive 3D graphics on the device

05:20.620 --> 05:28.870
display and the library actually ultimately makes a call to the OpenGL s C plus plus library, which

05:28.900 --> 05:35.230
in turn works with the underlying Linux kernel to perform the driving tasks.

05:35.470 --> 05:42.760
The C plus plus libraries are included to fulfill a wide and diverse range of functions, including

05:42.790 --> 05:52.250
2D and 3D graphics drawing secure sockets, layer, SSL communication, SQLite database management,

05:52.280 --> 06:00.710
audio and video playback bitmap and vector font rendering display subsystem and graphics layer management

06:00.710 --> 06:04.610
and an implementation of the standard C System library.

06:05.060 --> 06:06.860
This means the lib C here.

06:06.860 --> 06:13.730
So in practice, the typical Android application developer will access these libraries solely through

06:13.730 --> 06:17.790
Java or Kotlin based Android core library APIs.

06:17.810 --> 06:24.860
In the event that direct access to these libraries is needed, this can be achieved using the Android

06:24.890 --> 06:28.370
Native Development kit in the UK.

06:28.520 --> 06:34.940
So the purpose of which is to call the native methods of Non-java or Kotlin programming languages such

06:34.940 --> 06:42.650
as C and C plus plus from within the Java and Kotlin code using the Java Native interface G and I.

06:43.640 --> 06:49.310
And lastly, we have left to discuss the application framework in Android architecture.

06:49.430 --> 06:56.360
The application framework is a set of services that collectively form the environment in which applications

06:56.360 --> 06:59.720
and other applications run and are merged.

06:59.750 --> 07:06.650
This framework implements the concepts that Android applications are constructed from a reusable, interchangeable

07:06.650 --> 07:13.130
and replaceable components, and this concept is taken a step further in that an application is also

07:13.130 --> 07:20.960
able to publish its capabilities along with any corresponding data so that they can be found and reused

07:20.960 --> 07:23.060
by other applications.

07:23.060 --> 07:24.410
So they are following.

07:24.410 --> 07:30.890
The Android framework includes, for example, activity manager, which you can see on the screen here.

07:30.890 --> 07:39.530
So the applications here located at the top of the Android software stack are the applications.

07:39.530 --> 07:45.450
So these comprise both the native applications provided with the particular Android implementations,

07:45.450 --> 07:51.840
for example, web browser and the email applications and the third party applications installed by the

07:51.840 --> 07:54.990
user after processing the device.

07:56.970 --> 08:03.090
A good Android Development Knowledge Foundation requires an understanding of the overall architecture

08:03.090 --> 08:03.960
of Android.

08:04.050 --> 08:09.930
Android is implemented in the form of software stack architecture, consisting of a Linux kernel, a

08:09.930 --> 08:15.720
runtime environment and corresponding libraries, an application framework and a set of applications.

08:15.720 --> 08:23.130
So applications are predominantly written in Java or Kotlin and compiled down to bytecode format within

08:23.130 --> 08:25.380
the Android studio build environment.

08:25.410 --> 08:32.670
When an application is subsequently installed on a device, this byte code is compiled down by the Android

08:32.670 --> 08:38.310
runtime art to the native format used by the CPU.

08:38.460 --> 08:46.320
The key goals of the Android architecture are performance and efficiency, so both in application execution

08:46.320 --> 08:50.550
and the implementation of reuse in application design.
