Instruction 2

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

Preparing Your Android Device

Android emulators are efficient for cost-effective testing and development. Although emulators can simulate various Android devices and scenarios without physical hardware, you may run into a scenario where you need to run your Android app on a physical device. Testing your Android app on a physical device offers several advantages for a more comprehensive and accurate evaluation of your app.

Android Settings App
Alfweex Cunferyq Afn

About Phone Screen
Ideep Pbiso Rbkiey

4 Steps Away From Developer Mode
0 Yqihs Usek Ycop Cekecinec Yali

Developer Mode Enabled
Cavesacol Cohi Owibqim

Developer Options Screen
Rezenewat Ikreutm Kbgied

Connecting Your Device Via USB

In the developer options screen, you’ll see a long list of options. These options are there to adjust as needed during your development experience. After being mesmerized by all the settings you can tweak in the developer options screen, look for and enable USB debugging under the Debugging section.

Enable USB Debugging
Esutla IZJ Gafukgucr

Allow USB Debugging
Ifvad ENY Zucemzidy

Device Manager
Wasiqo Bonezuw

Connecting Your Device Using Wi-Fi

If you don’t want to tether your device to your computer using USB, Android Studio has you covered. You can connect your device to Android Studio using Wi-Fi. The connection setup can be done in the device manager window. One prerequisite to pairing your device through Wi-Fi is that your device and computer are on the same Wi-Fi network.

Pair New Devices Over Wi-Fi Screen
Kouf Zut Daqagiq Uqid No-Ra Zfruix

Pairing With QR Code

The first thing you need to do is ensure your Android device and your computer is on the same Wi-Fi network. Once your device and computer are connected to the same Wi-Fi, open the developer options screen in the settings app. To do this, open the Settings app. Tap on the Search settings text field and type in Developer options. Find and tap Developer options in the search results. Once you have opened the Developer Options screen, scroll down and look for the Wireless debugging option.

Enable Wireless Debugging
Oxodje Dixufuzc Metaqxokb

Enable Wireless Debugging Screen
Uyewya Yojizuzc Wexemratx Ckqiav

Wireless Debugging Enabled
Qerazuvq Poxovlahk Ayivsoq

Scan QR Code
Njah RS Naro

QR Code Paired Successfully
NK Xozu Viopuy Toljaqzbumlm

Pairing Using A Pairing Code

Pairing using a pairing code is very similar to pairing using the QR code. Make sure your Android device and computer are connected to the same Wi-Fi network. In Android Studio, open the device manager window. Next to the + button, is a button to pair devices using Wi-Fi. Click the Pair Devices Using Wi-Fi button. You’ll see the Pair new devices over Wi-Fi screen. Tap the Pair using pairing code tab.

Pair Using Pairing Code
Waag Upixx Waugocs Tawo

Wireless Debugging Enabled
Yafitiks Wurondewh Orutyup

Device Pairing Code
Jomeko Liuvowq Nigu

Code Pairing List of Devices
Kavo Haisudn Ridr ej Zekuruz

Enter Pairing Code
Olpoz Zaexosm Juwa

Code Paired Successfully
Vonu Zautif Wolsawljumcf

Running An App On A Physical Device

Running an Android app on physical devices is no different than running it on a virtual device. Open the Bullseye app you created in Lesson 1. This is the app you’ll run on your device.

Top Toolbar Run Controls
Gug Kuucheb Nat Kirplipb

App Running On Device
Egw Lahzakv Al Jolegu

Understanding The ADB

When your device is connected to your computer, quite a bit of communication happens in the background for Android Studio. Android Studio uses the Android Debug Bridge (ADB) to enable communication with Android devices. ADB is a command-line tool that serves as a communication bridge between your computer and the Android device or emulator.

Using The ADB

ADB commands are used for various tasks related to Android development and debugging. Android Studio provides a terminal window where you can interact with the ADB. To interact with the ADB, open the Android Studio terminal window by clicking the terminal icon on the bottom left toolbar.

Terminal Window Open
Bisgabop Yifxek Itaq

ADB Commands
AZL Quzfaclj

Setting the ADB Path Properly

Setting the path to ADB in your terminal makes it easy to execute the ADB command. The problem with setting the path in your terminal comes when you close your terminal session. The export command won’t retain the ADB path variable across terminal sessions. When you close and reopen a new terminal session, it won’t be able to find the ADB command line utility. To avoid adding the path to ADB in the terminal session every time, you can have your computer operating system add the ADB path every time you start a new session.

Discovering other ADB Commands

There are several useful ADB commands. The help parameter shows you all the available ADB commands. In the terminal, type adb help to see a complete list of commands available. Getting familiar with ADB ensures you have the tools necessary to control Android devices during your development process. Below are a few more common commands you should be aware of:

See forum comments
Download course materials from Github
Previous: Demo 01 Next: Demo 02