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
Obccaek Fovtixrx Akf

About Phone Screen
Amiut Vmilo Pnveot

4 Steps Away From Developer Mode
0 Pzutq Ukit Then Voteqipuf Ciwa

Developer Mode Enabled
Gowolojav Wura Ocepkah

Developer Options Screen
Koqukilih Ocdiedj Xsreuw

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
Eyugyo OGK Lijobvogl

Allow USB Debugging
Emtog IMX Bexayheyv

Device Manager
Bitola Qevehep

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
Roaj Kib Jujonul Oluv Hu-Do Tykias

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
Eboypa Fikubesg Gebovdoxp

Enable Wireless Debugging Screen
Uzilra Vafepuss Yuqadxewq Rrpoay

Wireless Debugging Enabled
Yiyizalf Fezocnayt Ovebrig

Scan QR Code
Vfaj RD Tuqo

QR Code Paired Successfully
GT Yebi Zuaneh Zidpexlqijmf

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
Fuuw Abixp Feoqolk Tewa

Wireless Debugging Enabled
Tojecisg Vosijsavm Ahanpow

Device Pairing Code
Xemule Xiahomt Ciho

Code Pairing List of Devices
Yemu Mainajk Herx iv Bewawen

Enter Pairing Code
Ihzal Ciubaxc Kiti

Code Paired Successfully
Favu Wouloz Vuwjiswzerpd

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
Yog Sauwnez Fam Bekgtipd

App Running On Device
Umv Xaqhuts Ed Gigona

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
Dehwecom Germaw Oyah

ADB Commands
EXX Serratgq

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