If you’re like most people, you probably use a computer to take screenshots of things you see on your screen. But if you’re using Android, there’s a better way to do it. The Android SDK makes it easy to take screenshots of things on your PC with just a few lines of code. Here’s how:
- Open the Android SDK Manager and click the “Add New Item” button.
- Type “android screenshot” into the text field and click the “Add” button.
- In the “Description” field, type something about how you want to take a screenshot and click the “Add” button again.
- In the “Usage” field, type something about how you want to use your screenshot and click the “Add” button again.
- Click the “Finish Addressing Changes” button and wait for the manager to create an android screenshot folder in your project’s directory (usually C:\Program Files\Android\SDK).
There’s no built-in way to take screenshots if your device is using a 2.x version of Android, such as Gingerbread or Froyo. However, you can take screenshots by connecting your Android phone to your computer and using Google’s Android SDK.
If you’re using Android 4.0 or later, you can take screenshots by pressing the Volume Down and Power buttons at the same time. if your device is rooted, you can also install one of many screenshot applications from Google Play.
Installing the Android SDK
Before installing the Android software development kit (SDK), you’ll need to download and install the Java Development Kit (JDK) from Oracle’s website. Download and install the 32-bit version of the JDK, even if you have a 64-bit version of Windows – the Android SDK seems to want the 32-bit version. The 32-bit version is identified as the Windows x86 version on Oracle’s website.
After the JDK is installed on your system, download the Android SDK from Google’s Android Developers website.
Next, open the Android SDK Manager from your Start menu (just search for “SDK Manager”). You’ll have to right-click the SDK Manager shortcut and select Run as Administrator if you installed the Android SDK for all users.
Check the Android SDK Platform-tools box and click the Install button to install it – the platform tools package contains the adb (Android debug bridge) utility, which we’ll need. If you see an error, the SDK Manager may not be running with administrator permissions.
Configuring Drivers & USB Debugging
You’ll need the drivers for your Android device installed. These can generally be acquired from your manufacturer. For example, if you’re using a Samsung device, install Samsung Kies to get the appropriate drivers for your Android. The drivers will be automatically installed with the software package.
You must enable USB debugging on your Android device by going into its Settings screen, tapping Applications, tapping Development, and checking the USB debugging check box.
Once the drivers are installed and USB debugging is enabled, connect your Android phone to your computer using its included USB cable. Your computer should automatically configure the phone with the required drivers.
Taking a Screenshot
To take a screenshot, you’ll have to launch the Dalvik Debug Monitor application. Navigate to the folder you installed the Android SDK to — C:\Program Files (x86)\Android\android-sdk by default if you installed it for all users. Launch the ddms.bat file located inside the tools subfolder in this folder.
You can make the Dalvik Debug Monitor easier to launch in the future by creating a shortcut for it – for example, you can drag and drop it to your Start button to quickly create a shortcut.
Once it’s launched, you should see your connected Android device in the window. Select the device, click the Device menu, and select Screen capture.
Use the Refresh button at the top of the window to take a new screenshot. Save the screenshot to an image file with the Save button or copy it to your clipboard with the Copy button. You can also rotate the screenshot prior to saving or copying it with the Rotate button.
If you want to take a screenshot in the future, just connect your Android phone to your computer, launch the ddms.bat file (possibly from a shortcut), and use the Screen capture tool.