BasicScreenCaptureProcessor

public class BasicScreenCaptureProcessor
extends Object implements ScreenCaptureProcessor

java.lang.Object
   ↳ android.support.test.runner.screenshot.BasicScreenCaptureProcessor


A basic ScreenCaptureProcessor for processing a ScreenCapture.

This will perform basic processing on the given ScreenCapture such as saving to the public Pictures directory, given by android.os.Environment.getExternalStoragePublicDirectory(DIRECTORY_PICTURES), with a simple name that includes a few characteristics about the device it was saved on followed by a UUID.

This API is currently in beta.

Summary

Fields

protected String mDefaultFilenamePrefix

protected File mDefaultScreenshotPath

protected String mFileNameDelimiter

protected String mTag

Public constructors

BasicScreenCaptureProcessor()

Public methods

String process(ScreenCapture capture)

Process the given ScreenCapture.

Protected methods

String getDefaultFilename()

Returns the default filename for this class suffixed with a UUID.

String getFilename(String prefix)

Returns the filename created from the given prifix and suffixed with a UUID.

Inherited methods

From class java.lang.Object
From interface android.support.test.runner.screenshot.ScreenCaptureProcessor

Fields

mDefaultFilenamePrefix

String mDefaultFilenamePrefix

mDefaultScreenshotPath

File mDefaultScreenshotPath

mFileNameDelimiter

String mFileNameDelimiter

mTag

String mTag

Public constructors

BasicScreenCaptureProcessor

BasicScreenCaptureProcessor ()

Public methods

process

String process (ScreenCapture capture)

Process the given ScreenCapture.

The given ScreenCapture defines optional properties like filename and format that should be respected when defining the behavior of this method.

Parameters
capture ScreenCapture: the ScreenCapture that specifies the bitmap to process

Returns
String the filename the bitmap was saved as

Throws
IOException

Protected methods

getDefaultFilename

String getDefaultFilename ()

Returns the default filename for this class suffixed with a UUID.

Returns
String

getFilename

String getFilename (String prefix)

Returns the filename created from the given prifix and suffixed with a UUID.

Parameters
prefix String

Returns
String