Seeing the App in Action

We’re ready to take the application for a ride. We’ll use an Android emulator to run the application and interact with it.

Click the Run menu in the IDE and select the Run App menu item. In the dialog that opens, click the Create New Virtual Device button. Select Pixel 2 XL in the Phone tab. Click the x86 Images tab and click the Download link next to Pie on the line for x86_64 (or select the one that is appropriate for your system). Once you have the system image installed on your system, select it and press the Next button. Click the Finish button. Now select the device Pixel 2 XL API 28 and click OK.

Once the app launches in the emulator, enter a few airport codes, for example, “IAD”, “SFO”, “AUS”, “PDX”, one at a time, and click the ADD button. As you click the button, you’ll see the details of the airport emerge in the RecyclerView, like in the following figure:

images/androidapp.png

The output shows the status of the airports that we entered, with only the San Francisco airport showing delays at the time of the run. The temperature is displayed both in Fahrenheit and Celsius.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset