Friday, March 29, 2024
HomeAndroidHow to Test Android App on Real Devices like Android Mobile or...

How to Test Android App on Real Devices like Android Mobile or Tablet using Android Studio

-

In the Previous Article We have Discussed about How To Install Android Studio and Running your First Basic App. We now Discuss in detail about How to Test or Run the android App on real devices like Android Mobile, Android Tablet.

There are Two Ways To Test an Android App:

1. Using a Real Device,

2. Using an  Emulator

How to Test Android App on Real Device:

To test Android App using Real Device such as Android Mobile or  Tablet, firstly you need to Enable USB debugging.  This USB Debugging option is available inside Developer options which may not be directly available to android users. These Developer options can be accessed in Two ways depending Upon the version your Android Device is Running:

[widget id=”text-3″]

a. For Devices Running with Android V3.2 or Older:

For these Devices you can access the Developer options by going to  Settings –> Applications –> Development. There you should enable USB Debugging.

b. For Devices Running with newer Versions From Android  V4.0:

For these Devices, The Developer options are not visible by default. You can access the Developer options by going to Settings –> About Phone –> Build Number. Now tap the Build Number for 7 Times so you can gain Access to Developer options. Now you can see a Toast Displaying that you are now a developer. Now return back to Settings. There you can now see Developer options above About Tablet. Enter into Developer Options and There you must enable USB Debugging.

Now the Final step is to Install Drivers for your Windows to detect the device. For mac, it is not needed.

Steps for Installing Drivers for Windows:

1.  Firstly, go to Android SDK Manager which can be accessed by clicking the SDK Manager icon shown in Image below:

test android app

 

 

2. Check Mark the Google USB Driver as shown in image below and Hit Install Package .

test android app

 

 

3. After Installing Google USB Driver, close SDK Manager window, Now Connect your Device through USB cable to your pc.

4. Now click on Windows Explorer and Right Click on My Computer (Windows 7) (or) This PC(Windows 8.1). Now Select Manage.

 

test android app

5. Now Select Device Manager –> Portable Devices –> Your Device Name

test android app

6. Right Click on Your Device Name and Select Browse My Computer For Driver Software.

7. Now Point it to  C:\Users\YourUserName\AppData\Local\Android\sdk\extras\google\usb_driver. Hit Next and Finish.

Now your PC and Android Studio can recognize your Device if you carefully followed the above steps.

Make Sure that you Checked USB Debugging in Developer Options and Selected OK to allow USB Debugging. You will be asked to Allow USB Debugging for each different Computer  you connect your device, showing its RSA fingerprint.

Now You Hit Run Button after selecting Your Project in Project Explorer in Android studio. You will be shown a Window for choosing a Device. If you followed above steps, Your Device will Be shown as Online similar to image shown Below:

test android app

Now Hit OK.

[widget id=”text-3″]

Your Device will now Run the App! Note that this is One time Configuration. Testing Your app on real device is the Recommended way as it is the faster compared to That of running the app through Emulator. In the Next article we will discuss about Testing the App through Emulator.

 

[widget id=”text-4″]

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

LATEST POSTS

SOLID Principles in Android with Kotlin Examples

Recently I had an interview experience where I went blank when the interviewer posed an Interesting Question - Explain SOLID Principles and how they are...

Building a Multi Module App in Android | Modularization in Android #1

Recently, I was in requirement for developing a Multi Module app in Android and I was going through this great lecture on it. This article...

Lambda function in Kotlin with Examples

Lambda function is powerful feature in any Programming language and Lambda function in Kotlin is no exception. In this article, we will look at how...

Higher Order Functions in Kotlin with examples

There are many advanced features in Kotlin which gives an edge for the user using this language over Java. One such feature is Higher Order...

Follow us

1,358FansLike
10FollowersFollow
399SubscribersSubscribe

Most Popular