---
title: Check Android Screen Resolution | TestingBot
description: Find out the various ways to determine the screen resolution of your
  Android device.
source_url:
  html: https://testingbot.com/software-testing-questions/how-to-check-screen-resolution-on-android
  md: https://testingbot.com/software-testing-questions/how-to-check-screen-resolution-on-android.md
---

# How to check the screen resolution on Android

Published February 9, 2024

- [![Share on Facebook](https://static.addtoany.com/buttons/facebook.svg) ](https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Ftestingbot.com%2Fsoftware-testing-questions%2Fhow-to-check-screen-resolution-on-android.md&linkname= "Share on Facebook")
- [![Share on Twitter](https://static.addtoany.com/buttons/twitter.svg) ](https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Ftestingbot.com%2Fsoftware-testing-questions%2Fhow-to-check-screen-resolution-on-android.md&linkname= "Share on Twitter")
- [![Share on LinkedIn](https://static.addtoany.com/buttons/linkedin.svg) ](https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Ftestingbot.com%2Fsoftware-testing-questions%2Fhow-to-check-screen-resolution-on-android.md&linkname= "Share on LinkedIn")
- [![Share on HackerNews](https://static.addtoany.com/buttons/y18.svg) ](https://www.addtoany.com/add_to/hacker_news?linkurl=https%3A%2F%2Ftestingbot.com%2Fsoftware-testing-questions%2Fhow-to-check-screen-resolution-on-android.md&linkname= "Share on HackerNews")

On Android, you can either check the screen resolution through the device settings or check it programmatically (using Java or Kotlin, or another programming language compatible with Android).

## Check Screen Resolution through Settings

The most user-friendly way to check the resolution is by navigating to the Settings app on your Android device.

1. **Open the Settings app** on your Android device. The icon looks like a gear or a set of sliders. 
2. Depending on your device, you might find the display settings under **Display** , **Screen** or **Device** settings. 
3. Look for an option that provides information about the screen resolution. It might be labeled as **Resolution** , **Screen resolution** or something similar. 

Another method is to check the About Phone menu:

1. **Open the Settings app** on your Android device. The icon looks like a gear or a set of sliders. 
2. Scroll down to the **System** section and tap it. 
3. Look for the **About phone** option and tap it. 
4. Next, scroll down the page and look for an item called Screen Resolution. 

## Check Screen Resolution with ADB

ADB is an utility that you can use to connect to your Android device, through CLI.

Simply connect your device with a USB cable and make sure that USB debugging is active.

Next, you can use the shell to fetch information about the current window.

```bash
adb shell dumpsys window
```

Look for information in the output that starts with **mDisplayInfo** , you will see the resolution (width and height) in pixels in the result.

## Check Screen Resolution Programmatically

You can use this example code, written in Java, to check the screen resolution of the device.

```java
import android.content.Context;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.WindowManager;

public class ScreenUtils {

    public static String getScreenResolution(Context context) {
        WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);

        if (windowManager != null) {
            Display display = windowManager.getDefaultDisplay();
            DisplayMetrics metrics = new DisplayMetrics();
            display.getMetrics(metrics);

            int widthPixels = metrics.widthPixels;
            int heightPixels = metrics.heightPixels;

            return widthPixels + " x " + heightPixels;
        } else {
            return "Unknown";
        }
    }
}
```

Using this class, you can then fetch the resolution anywhere in your Android app:

```java
String resolution = ScreenUtils.getScreenResolution(getApplicationContext());
```

- [![Share on Facebook](https://static.addtoany.com/buttons/facebook.svg) ](https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Ftestingbot.com%2Fsoftware-testing-questions%2Fhow-to-check-screen-resolution-on-android.md&linkname=)
- [![Share on Twitter](https://static.addtoany.com/buttons/twitter.svg) ](https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Ftestingbot.com%2Fsoftware-testing-questions%2Fhow-to-check-screen-resolution-on-android.md&linkname=)
- [![Share on Linkedin](https://static.addtoany.com/buttons/linkedin.svg) ](https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Ftestingbot.com%2Fsoftware-testing-questions%2Fhow-to-check-screen-resolution-on-android.md&linkname=)
- [![Share on Hacker News](https://static.addtoany.com/buttons/y18.svg) ](https://www.addtoany.com/add_to/hacker_news?linkurl=https%3A%2F%2Ftestingbot.com%2Fsoftware-testing-questions%2Fhow-to-check-screen-resolution-on-android.md&linkname=)

 ![TestingBot Logo](https://testingbot.com/assets/logo-head-2f7f08db4ac9c4a3b1a784047410f8a4ece708e7e9f10ed16e20fdd8310f8de3.svg)

## Sign up for a Free Trial

Start testing your apps with TestingBot.

No credit card required.

[Start Free Trial](https://testingbot.com/users/sign_up)

## Other Questions

### [Viewing the HTML source in Safari](https://testingbot.com/software-testing-questions/how-to-view-source-code-in-safari "Viewing the HTML source in Safari")

### [How do you use a proxy during automated testing?](https://testingbot.com/software-testing-questions/how-to-use-a-proxy-for-automated-testing "How do you use a proxy during automated testing?")

### [What is a browser window?](https://testingbot.com/software-testing-questions/what-is-a-browser-window "What is a browser window?")

### [Cause and solutions for slow running Selenium tests.](https://testingbot.com/software-testing-questions/why-are-selenium-tests-running-slow-or-timing-out "Cause and solutions for slow running Selenium tests.")

### [Keyword Driven Testing examples and advantages](https://testingbot.com/software-testing-questions/what-is-keyword-driven-testing "Keyword Driven Testing examples and advantages")

### [What is Chrome for Testing?](https://testingbot.com/software-testing-questions/what-is-chrome-for-testing "What is Chrome for Testing?")
