Hello, and welcome. In this lesson, you'll learn how to test your Kotlin code using Android Emulator, or what is sometimes called a Virtual Android device. So right now, you're running Android Studio on your machine using Windows or some other operating system, but to test our programs, we will need to emulate the Android operating system. So we need to create an Android Emulator within Android Studio. So we have a project and we have an app called Hello World, but how do we know if it works? Since we're making Android apps, it would be really nice to have a device to test our applications. And though you might have an Android phone, it's easier to test your apps right on your machine. So if you don't have a physical Android device, don't worry about it. We can create a virtual Android device right here on Android Studio. So Android Studio comes with an Android Virtual Device manager or the AVD manager, which we can use to create Android Emulators that we can run on our computer. Each emulator that we create will simulate a particular type of Android device, whether it's a pixel device or a tablet or a Samsung, or maybe a certain release of the operating system. We can do Android 4.4 or Android 11 or Android 10. Once we build these, we can run our apps on these emulators just as if we were running a true physical device. But I'm warning you though, these emulators take up a lot of disc space and it's resource intensive. So depending on your computer specs, take some caution before you start creating and running multiple devices, because you're gonna find it hard to work with a whole lot of these apps making calls to your processor. All right, so let's take a look at the emulator. In Android Studio here, across the top navigation bar, I'm gonna go to tools. And when I click on tools, you can see that we have a whole bunch of content. Generate Java, .console, XML, Kotlin, plugins. And here is our AVD manager, our Android Virtual Device manager. I'm gonna click on that, and up pops the virtual devices for Android Studio. We already have one emulator already here, which is a pixel, and we can also create even more virtual devices. I'm gonna click on this and it gives us several options here. So first we select our hardware. We can select TV or phone or wearable or tablet or even automotive. So I'm gonna select tablet. I'm gonna do a Nexus 10, and I'll click next. And it gives us a choice of various releases of Android, Android 9.8, Android 10, Android 11. I'm gonna choose Android 8.1 just for fun, and now let's look at our images. We have a large selection of images that we can use, but I like the marshmallows. I'll choose that. And here's our Android guy holding a marshmallow. So after this lesson, you might wanna create a few virtual devices for yourself. It's always good to test your apps on as many devices as possible because out in the real world, all of these devices are used. Some people have old phones, some people have brand new technology. There's a mix and match of different operating systems. So try to test your device on as many as you can. Now let me go back into tools, and I'm gonna go to AVD Manager. Open it up, so let's test our app. Let's look at some of the actions that we can do. We can launch our emulator or we can edit our emulator. So I'm gonna click on edit and here we can change the name if we don't like this name, or we can change the device type, or we can change the icon. And it's asking how we wanna start off the device, and what is the orientation? And when I use my apps, always do it in portrait, but you can do landscaping. I'm gonna keep it in portrait for now, and we have a choice of graphics and that's how we can edit our device. I'm gonna finish that out, now we're ready to go. So let's launch the AVD, and I'll click run app as it's running for the first time, you can see down here, the Gradle is building, and here's our emulator. It looks just like a phone, just like a pixel if you asked me. We can see our Google logo, it's booting up and just like a real phone, we have to wait for the boot. All right, Pixel is starting, starting to look like a phone and here's our Android Emulator, looks just like a phone. Here's the Messenger. I can put this thing through all the paces of the actions, just like it was a regular Android phone. I can go back. I can try Chrome. Chrome starts up. I can get rid of that. All right, we all know how an Android operating system works. Now over here, I can power on and off, I can adjust my volume up and down, I can rotate it, rotate it all around, can even do the camera, magnifying Zoom. I can go back, I can go home, and let's do more. I can turn on the location. I can check out the displays. We can work with the battery, the microphone settings, or do settings in general, just like a regular Android phone. Okay, now let's run our app. I'll click on run app and then let's check the emulator. There's our program, Hello World. Our program is now linked to our device. We've tested it, we've successfully created an app on our Android phone, and now that we've made this connection, we can start building more sophisticated applications and test it. So if I click on home, it'll show there and I can remove it. I can run our program again, and our virtual emulator works. So that concludes our lesson on how to test your mobile app, using an Android Emulator. Thanks for watching. Stay tuned for our next lesson.