Welcome to Part 1 of this review of the Pluralsight course Start Developing For Android by Chiu-Ki Chan.
Chiu-Ki is a mobile developer with a passion in speaking and teaching.
Start Developing For Android
This is a short course for Android beginners. It is only 1 hour and 3 minutes long, but by the end of it, we will have written our first Android app, which will be based on Chiu-Ki’s open source Android Hello World project.
What Is an Android App?
Chiu-Ki explains that we should think of Android apps as collections of screens, or activity as they are called in Android.
An activity is similar to a web page. Chiu-Ki uses Twitter as an example, and explains the meaning of the words Activity and Intent by showing how they relate to a website such as Twitter.
We learn that Android Intents are more powerful than web links as they can send data back to the original activity.
Android Studio Installation
This consists of three simple steps:
- Android Studio
- Import Hello World
Chiu-Ki uses a Macintosh for her installation. Windows users will need to use the command prompt instead of the Mac Terminal.
In this course Chiu-Ki downloads JDK 7, but I recommend downloading the newer JDK 8 for the latest features and security updates. At the time of writing Oracle recommend JDK 8u91 instead of 8u92.
Install Android Studio
Chiu-Ki demonstrates how to install it and how to set it up. This will take a while, but once done we’ll be ready to import our hello world app.
Run Hello World
Even if you aren’t a Pluralsight subscriber, you can watch this lesson for free on YouTube.
Either download Android Hello World as a zip file, or use Git clone.
Chiu-Ki shows how to use Git clone on a Mac to download it, and then how to import it into Android Studio.
Before we look at the actual code, Chiu-Ki shows us how to get it to run in an emulator.
We must create the emulator to match the device that we wish to emulate.
Chiu-Ki shows us how to create a virtual device, and advises on which system image to select. We choose the Marshmallow API level.
We also learn the terminal command that tells us whether we have a 64 bit machine
Now that we know which emulator we want, we wait for it to download, and then we can launch it.
What we see being emulated is an Android phone with the factory defaults. Now we want to get our app running on it.
Chiu-Ki shows us the green triangle can be used for running our emulator.
We can tell Android Studio to use the same one each time by checking “Use same selection for future launches”. We see our Hello World app running in our emulator:
Next, we want to run the app on an actual device. We learn that we need to tap on the Build Number in the About Phone section 7 times.
Congratulations, you are now a developer! The developer options menu has now been unlocked on your mobile device.
In here, you’ll find the USB debugging setting which you should enable.
Chiu-Ki shows us how to use Android Debug Bridge (ADB) within Android Studio, and we see the full path of the ADB command.
By the end of this lesson, we have Hello World running both on the mobile device, and on the desktop computer.