Download and import Android 11 sample projects from the Android team's GitHub profile to see how to use many of the various components of the platform in your apps. In this video, download and import the people sample to go through it in the next video.
- [Instructor] Throughout this course, I will reference many sample projects that are created and shared by the Android team on GitHub. These samples demonstrate many of the various components in the Android system and how you can make use of them in your apps. If you are familiar with Git, you can clone any of these repositories to your workstation and go from there. But I will be going over how to import these projects manually after downloading a zip of the repository. You can start by going to github.com/android. Here you can find a list of all of the sample projects available organized into various repositories by what they deal with. We want the user interface samples repository. If you do not see it in the list, you can search for it, using the find a repository box at the top by typing user. Let's go into the user interface samples repository. Like many of these other repositories, this contains multiple projects that demonstrate numerous components related to the repository category that it is contained with it. For example, this contains projects that deal with the user interface. We are looking for the people project. It is easiest though for us to download this entire repository and then pick this project out from there. From the top, click the clone or download button. And then click download zip. I'm going to save this to my desktop to make it easy to access. Once it is finished downloading, I can go to my desktop. Let's clean up some of these unneeded windows along the way. Right click the downloaded zip file. And choose extract all. I'm going to extract it into another folder right on the desktop. And now in Android Studio, we can import the people project. Click the import project button near the bottom. Navigate to your desktop by clicking the little computer icon next to the house at the top. Open the folder we extracted the zip file into, user interface samples master. Scroll down and select the people project. You can see that Android Studio already detects that this is an Android project because the icon next to the folder is a little Android. Click okay to import the project. This is okay because I am not actually using the NDK tools, but generally speaking, you should make sure to save the SDK to a folder that does not contain white space. This falls outside of the scope of the course as to why and how, so let's just click okay for now. Let's expand Android Studio, fill the screen. See more of what we're doing. You can see in the read me for this project, a brief overview of the bubbles future. The sample goes over many other concepts, but I'm only going to be looking at the content related to Bubbles. We should now wait for the first Gradle sync finish to make sure we have all the appropriate dependencies installed. This may take a while. You may get a pop-up that tells you to update your Android Gradle plug-in. Go ahead and update. This also may take a little while. If you did not see that pop up, you might not have noticed that Gradle finished. So, if you no longer see any activity in the bottom right corner where you would normally see some Gradle sync progress, you can click the event log and check to see if Gradle sync finished. You can follow the same process for any of the other samples available from the repositories posted by the Android team on GitHub. I will point out samples that are relevant to some of the features in Android 11 as I discuss them.