Check out a free preview of the full Introduction to Kotlin and Android Development course

The "Android Overview" Lesson is part of the full, Introduction to Kotlin and Android Development course featured in this preview video. Here's what you'd learn in this lesson:

Maximiliano walks through the layers of the Android operating system and which parts will be utilized in this course. An Android application should contain an APK, a ZIP package containing compiled VM code, metadata, assets, and a signature and be installable via the Play Store or USB cable.

Preview
Close

Transcript from the "Android Overview" Lesson

[00:00:00]
>> I don't wanna get too theoretical here but something that is important for you to understand is that, Android is an Open Source Project, and is an open source operating system. And actually, when we are building apps for Android, sometimes we are building for the AOSP. AOSP stand for Android Open Source Project.

[00:00:23]
That's AOSP, Android Open Source Project. But on top of that, most of the phones that we owned these days, they have another layer known as GMS, that's Google Mobile Services. And not everything that we are used to as Android users, it's actually open source. For example, Google Maps is not in the open source layer.

[00:00:48]
So the same with play services such as the Play Store, but also some services that the OS is offering to apps such as, for example, Geolocation using Wi-Fi. So those services are not available in the open source project. And some vendors such as Samsung, some manufacturers are also adding some layers on top of that.

[00:01:13]
For example, if you wanna support the Samsung Pen, or if you wanna support the Foldables at some points that are not part of the other open source project. They have libraries, they're offering for you libraries that you can use for those devices only. I'm mentioning this because there are some devices out there without the GMS layer, okay?

[00:01:41]
So in terms of market share is probably 5% or less than 5%. But for example we have there. Some examples are FireOS. That's the OS actually available on Amazon devices, that can be the Fire Tablet and also the Fire Stick that you can or Fire TV that you can connect to your TV.

[00:02:04]
Also Huawei devices, Huawei phones, so they don't have the Google layer. Meaning that when you're building your app, you need to be very careful when you're using some API's and libraries because those libraries might not be available on all the phones. If you're using libraries from the AOSP layer, you're good, you're good to go everywhere.

[00:02:28]
But sometimes, you need to be very careful because sometimes it won't be available, okay? For the all the topics that we're going to cover today, we are going to be working with the AOSP. So our app will actually work everywhere but have in mind, when you start adding more libraries, and we are starting using services from the operating system that they might not be available for all your users.

[00:02:51]
In those cases, you need to find, for example, Huawei, it has an alternative map provider that is part of their vendor software. But yeah, then you need to start doing some conditions in your app, okay? If it's a Huawei device, I need to use the Huawei map, and if it's not, I need to use the Google Map service.

[00:03:10]
Okay, something like that. One of the problems of Android is that diagram, it's device fragmentation. This is actually from a couple of years ago, so today is even worse. Every rectangle that you see there is actually a different phone. A different device that is actually active in the market.

[00:03:29]
So we have so many devices from so many different vendors with so many different characteristics, that creating an Android application seems a problem mostly for testing. And that's why using a UI framework that is flexible and can adjust to different scenarios, it's actually a good idea. Compare this with iOS app development, this is much worse.

[00:03:55]
When iOS, we have yeah three four or five different iPhones and maybe some iPads and that's all. So if you wanna test our application, you just need to test on a couple of screen sizes. But here, we have hundreds of different possibilities. So under that app development has these challenges.

[00:04:18]
So talking about Android with Kotlin. We're going to be building APKs. So that's actually our output and APKs an Android Package. The Android Package is just a ZIP file that will include your compile VM code, we're going to talk about that VM in a minute. So your compiled code from Kotlin, Meta data in different formats, there are a couple of XML and some other things there, assets mean PNG files and other formats that we will see later.

[00:04:52]
A signature because we are going to sign an APK and it's going to be installable .apk via the Play Store or other app stores. And today, the Play Store since the beginning of 2022 doesn't support APKs anymore. So we have APK, that's the output of our building solution but actually, the Play Store will need another file.

[00:05:22]
It's called AAB, Android App Bundle. At the end of today's workshop, we're going to see how to build both, okay? So the APK is actually the actual format that the phone is going to take but the Play Store needs another format, it's called AAB. And then the Play Store will build the final APK for your users, that's kind of thing.

[00:05:48]
You can also publish or distribute your app through enterprise solutions. So if you're working for a company and the company has some portals or system like enterprise solutions, where they can actually ship the app to their employees without actually going into the public App Store. And also, you can install your APK in your device through a USB.

[00:06:13]
We're going to see how to connect your phone in case you have one in Android Studio, or other method, I mean, I can polish the APK on your website, I can create my own App Store or things like that, okay? So to actually make that happen, your users need to disable some security rules on the phone to install an APK from untrusted sources, but it's technically possible, okay?

[00:06:38]
So that's why we're going to build, that's the output of our project when we are building Android apps, no matter the framework or the language that you're using.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now