Subtitles section Play video Print subtitles Let's step back for a moment to talk about the Android system architecture. The Android framework offers lots of useful classes to help you interact with the system. Think the activity of lifecycle or device permissions, for example. Or to help you access some type of device functionality, like the camera or the radios, like Wi-Fi or Bluetooth. Sometimes, sensors like the gyroscope. The path to accessing device hardware from the framework comes together via a series of layered abstractions. What do I mean by that? Each layer focuses on solving a bit of the problem while the underlying layers focus on solving subsequently smaller problems until eventually, with all the layers combined, the desired functionality is achieved. Now we won't go into heavy details about what each layer does, but we'll help you focus on the layers you should be familiar with. Lets take a look. You can think of a functioning Android device as being made up of different layers. Now we've simplified this a tad to focus on the essentials, but feel free to check out the link in the nodes for an exhausted diagram on the Android Open Source Project site. The very top layer is the application layer where all the applications that developers like you and I build. Within our app, we make use of the Android framework classes like text view and activity. And when we use these classes, we can do some complex or powerful things with only a few lines of code. In this case, we're displaying some text or opening a new screen, for example, but there's so much more. So, how is this possible? Well, the framework classes are obstructing away unnecessary complexity from us by calling into the lower levels of Android and relying on them to do the heavy lifting. That is the tough and intricate job of controlling a devices hardware. Until eventually, it all works and this is what we mean by layer obstructions. The core operating system or an OS for short has its own sophisticated code to regulate how application and system processes both access the limited resources of the device hardware. Now, applications running simultaneously must share the resources of the device in order to preserve the system's overall usability and responsiveness. The lowest layer is the actual physical device hardware. That is the silicone that makes up for example the wireless radios, like cellular, Wi-Fi and Bluetooth. The chips that control the screen and then there's the CPU, the memory, the GPU and much, much more. These are the physical electronic components that are packed in to your device. If you're going to take away a one thing, know that the beauty of these layers is that they exist to simplify or distract away the system's complexity from US developer. Allowing you to focus on making grade apps that can leverage as much of the device's hardware as possible. So you can think of the framework, as these clue between our app and the device. The framework classes allow us to articulate how the device should behave when a user is in our app. Now, the framework compose of all these Java classes that we see on developer.android.com, as well as some libraries written in a programming language called C and its relatives. Lets talk about a few examples of how we've already relied on these different layers without even realizing it. In our app code, we've been calling the framework APIs. So for example, when we were building the Me Walk app, we were using the media framework classes to play audio from the speakers of the device. In the current lesson, we're using the HTTP URL connection class to make network requests, which uses the radio on the device to send packets of information across the internet. Now, we don't need to deal with the Android Operating System directly. Now, the framework classes are Java classes that obstruct the implementation details over what's happening underneath in the hardware. Now, the immediate player in HTTP URL connection or two examples of classes that use the physical functionality of our Android device by interacting with framework classes. There are many more examples that you'll come across, as you continue to learn more about Android development.
B1 US android device framework hardware layer app Arquitetura do Sistema Android 78 9 Shuyang posted on 2017/03/14 More Share Save Report Video vocabulary