1 00:00:01,440 --> 00:00:07,530 So far in this course, steps have been taken to set up an environment suitable for the development 2 00:00:07,530 --> 00:00:10,160 of Android applications using Android studio. 3 00:00:10,170 --> 00:00:16,380 An initial step has also been taken into the process of application development through the creation 4 00:00:16,410 --> 00:00:19,020 of Android Studio Application Project. 5 00:00:19,050 --> 00:00:25,650 Before delving further into practical matters of Android application development, however, it is important 6 00:00:25,650 --> 00:00:31,230 to gain an understanding of some of the more abstract concepts of both Android software development 7 00:00:31,230 --> 00:00:33,960 kit and Android development in general. 8 00:00:34,140 --> 00:00:41,850 Gaining a clear understanding of these concepts now will provide a sound foundation on which to build 9 00:00:41,850 --> 00:00:43,050 further knowledge. 10 00:00:43,050 --> 00:00:49,230 So starting with an overview of Android of Android application in this course and continuing to in the 11 00:00:49,230 --> 00:00:56,640 next few lectures of this course, the goal is to provide a detailed overview of the fundamentals of 12 00:00:56,640 --> 00:00:58,140 Android development. 13 00:00:58,170 --> 00:01:01,260 My name is Stephan and let's get started with our lecture. 14 00:01:13,410 --> 00:01:21,930 The Android software stack on Android is a structured in the form of software stack comprising applications 15 00:01:21,930 --> 00:01:26,700 and operating systems, runtime, environment, middleware services and libraries. 16 00:01:26,970 --> 00:01:34,920 This architecture can perhaps can best be represented visually as outlined in this screenshot. 17 00:01:35,100 --> 00:01:42,060 Each layer of the stack and the corresponding elements within each layer are tightly integrated and 18 00:01:42,060 --> 00:01:48,720 carefully tuned to provide the optimal application, development and execution environment for mobile 19 00:01:48,720 --> 00:01:49,500 devices. 20 00:01:49,530 --> 00:01:56,610 The remainder of this course will work through the different layers of this Android stack and starting 21 00:01:56,670 --> 00:01:59,490 the bottom with the Linux kernel. 22 00:02:00,190 --> 00:02:02,920 So let's get started with the Linux kernel. 23 00:02:03,600 --> 00:02:08,310 Linux kernel positioned at the bottom of Android software stack. 24 00:02:08,340 --> 00:02:15,300 The Linux kernel provides a level of abstraction between the device hardware and upper layers of Android 25 00:02:15,300 --> 00:02:19,540 software stack based on Linux version 2.6. 26 00:02:19,560 --> 00:02:26,940 The kernel provides a preemptive multitasking, low level core system services such as memory process 27 00:02:26,940 --> 00:02:28,470 and power management. 28 00:02:28,470 --> 00:02:35,580 In addition to providing a network stack and device drivers for hardware such as device displays, WiFi 29 00:02:35,580 --> 00:02:36,900 and audio. 30 00:02:37,230 --> 00:02:47,430 The original Linux kernel was developed by in 1991 by Linus Torvalds and was combined with a set of 31 00:02:47,430 --> 00:02:55,200 tools, utilities and compilers developed by Richard Stallman at the Free Software Foundation to create 32 00:02:55,200 --> 00:02:59,430 a full operating system referred to as Genie or Linux. 33 00:02:59,460 --> 00:03:07,660 The various Linux distributions have been derived from the basic underpinnings such as Ubuntu and Red 34 00:03:07,690 --> 00:03:09,400 Hat Enterprise Linux. 35 00:03:09,430 --> 00:03:15,990 The Kali Linux and the Ubuntu and other Linux based systems. 36 00:03:16,000 --> 00:03:22,630 And it's important to note, however, that Android uses only the Linux kernel. 37 00:03:22,660 --> 00:03:31,030 That said, it is worth noting that the Linux kernel was originally developed for use in traditional 38 00:03:31,030 --> 00:03:33,610 computers in the form of desktops and servers. 39 00:03:33,640 --> 00:03:41,260 In fact, Linux is now most widely deployed in mission critical enterprise server environments and it 40 00:03:41,260 --> 00:03:48,160 is a testament to both the power of today's mobile devices and the efficiency and performance of the 41 00:03:48,160 --> 00:03:54,370 Linux kernel that we find this software at the heart of the Android software stack. 42 00:03:55,680 --> 00:04:03,930 In addition to a set of standard Java Kotlin Development libraries, this providing a support for such 43 00:04:03,930 --> 00:04:10,590 general purpose tasks such as string handling, networking and file manipulation. 44 00:04:10,620 --> 00:04:15,930 The Android development environment also includes the Android libraries. 45 00:04:16,260 --> 00:04:21,810 These are a set of Java based libraries that are specific to Android development. 46 00:04:21,840 --> 00:04:27,840 Examples of libraries in this category include the application framework libraries in addition to those 47 00:04:27,840 --> 00:04:34,740 that facilitate user interface building, graphics, drawing and database access. 48 00:04:34,740 --> 00:04:40,080 And on the screen you are seeing some of the most used libraries in Android. 49 00:04:44,020 --> 00:04:45,700 The Android runtime. 50 00:04:45,700 --> 00:04:52,960 Core libraries, as outlined in the preceding section, are Java and Kotlin based and provide the primary 51 00:04:52,990 --> 00:04:56,050 APIs for developers writing Android application. 52 00:04:56,170 --> 00:05:03,340 And it's important to note that, however, that the core libraries do not perform much of the actual 53 00:05:03,340 --> 00:05:11,770 work and are in fact essentially Java and Kotlin wrappers around a set of C and C plus plus based libraries. 54 00:05:11,770 --> 00:05:20,620 So when making a calls, for example, the Android OpenGL library to drive 3D graphics on the device 55 00:05:20,620 --> 00:05:28,870 display and the library actually ultimately makes a call to the OpenGL s C plus plus library, which 56 00:05:28,900 --> 00:05:35,230 in turn works with the underlying Linux kernel to perform the driving tasks. 57 00:05:35,470 --> 00:05:42,760 The C plus plus libraries are included to fulfill a wide and diverse range of functions, including 58 00:05:42,790 --> 00:05:52,250 2D and 3D graphics drawing secure sockets, layer, SSL communication, SQLite database management, 59 00:05:52,280 --> 00:06:00,710 audio and video playback bitmap and vector font rendering display subsystem and graphics layer management 60 00:06:00,710 --> 00:06:04,610 and an implementation of the standard C System library. 61 00:06:05,060 --> 00:06:06,860 This means the lib C here. 62 00:06:06,860 --> 00:06:13,730 So in practice, the typical Android application developer will access these libraries solely through 63 00:06:13,730 --> 00:06:17,790 Java or Kotlin based Android core library APIs. 64 00:06:17,810 --> 00:06:24,860 In the event that direct access to these libraries is needed, this can be achieved using the Android 65 00:06:24,890 --> 00:06:28,370 Native Development kit in the UK. 66 00:06:28,520 --> 00:06:34,940 So the purpose of which is to call the native methods of Non-java or Kotlin programming languages such 67 00:06:34,940 --> 00:06:42,650 as C and C plus plus from within the Java and Kotlin code using the Java Native interface G and I. 68 00:06:43,640 --> 00:06:49,310 And lastly, we have left to discuss the application framework in Android architecture. 69 00:06:49,430 --> 00:06:56,360 The application framework is a set of services that collectively form the environment in which applications 70 00:06:56,360 --> 00:06:59,720 and other applications run and are merged. 71 00:06:59,750 --> 00:07:06,650 This framework implements the concepts that Android applications are constructed from a reusable, interchangeable 72 00:07:06,650 --> 00:07:13,130 and replaceable components, and this concept is taken a step further in that an application is also 73 00:07:13,130 --> 00:07:20,960 able to publish its capabilities along with any corresponding data so that they can be found and reused 74 00:07:20,960 --> 00:07:23,060 by other applications. 75 00:07:23,060 --> 00:07:24,410 So they are following. 76 00:07:24,410 --> 00:07:30,890 The Android framework includes, for example, activity manager, which you can see on the screen here. 77 00:07:30,890 --> 00:07:39,530 So the applications here located at the top of the Android software stack are the applications. 78 00:07:39,530 --> 00:07:45,450 So these comprise both the native applications provided with the particular Android implementations, 79 00:07:45,450 --> 00:07:51,840 for example, web browser and the email applications and the third party applications installed by the 80 00:07:51,840 --> 00:07:54,990 user after processing the device. 81 00:07:56,970 --> 00:08:03,090 A good Android Development Knowledge Foundation requires an understanding of the overall architecture 82 00:08:03,090 --> 00:08:03,960 of Android. 83 00:08:04,050 --> 00:08:09,930 Android is implemented in the form of software stack architecture, consisting of a Linux kernel, a 84 00:08:09,930 --> 00:08:15,720 runtime environment and corresponding libraries, an application framework and a set of applications. 85 00:08:15,720 --> 00:08:23,130 So applications are predominantly written in Java or Kotlin and compiled down to bytecode format within 86 00:08:23,130 --> 00:08:25,380 the Android studio build environment. 87 00:08:25,410 --> 00:08:32,670 When an application is subsequently installed on a device, this byte code is compiled down by the Android 88 00:08:32,670 --> 00:08:38,310 runtime art to the native format used by the CPU. 89 00:08:38,460 --> 00:08:46,320 The key goals of the Android architecture are performance and efficiency, so both in application execution 90 00:08:46,320 --> 00:08:50,550 and the implementation of reuse in application design.