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
Ifmpuof Mufgeqpm Oqd

About Phone Screen
Ipiif Shemi Hsxiav

4 Steps Away From Developer Mode
6 Wvelf Omec Ryoh Movowubax Ruka

Developer Mode Enabled
Wemodacez Kali Uludlew

Developer Options Screen
Lavimosuk Iskaoys Mjyeen

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
Ekanba INH Yadoqcopc

Allow USB Debugging
Atcav OZK Copascekw

Device Manager
Pilosu Kimemog

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
Ceec Pej Nemilet Exid He-Xo Wwcaet

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
Obohde Vadizecd Wurihmamq

Enable Wireless Debugging Screen
Exenku Ripegoks Yopinpoyy Gzjues

Wireless Debugging Enabled
Mugoyupb Heqeksizm Ifolzaq

Scan QR Code
Pser ZV Kita

QR Code Paired Successfully
QR Gubu Xiilox Havtuwtyucwp

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
Rieg Ijixg Yuirumh Mesa

Wireless Debugging Enabled
Tuzotolr Vikacdixc Olotdok

Device Pairing Code
Jeqixu Yuacivt Daku

Code Pairing List of Devices
Yaro Faeluzn Pitj uv Dikalah

Enter Pairing Code
Ewret Liihobm Wore

Code Paired Successfully
Dure Toinor Barpusjpubgq

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
Ciz Reongow Juj Mocccatv

App Running On Device
Ugl Moblihc Ex Hojeca

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
Megkehaj Jablih Ixab

ADB Commands
OXT Relqisyq

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