# BasicScreenCaptureProcessor

Summary:[Fields](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#lfields)\|[Ctors](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#pubctors)\|[Methods](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#pubmethods)\|[Protected Methods](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#promethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#)  

# BasicScreenCaptureProcessor

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


class
BasicScreenCaptureProcessor
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`


``


implements

`[ScreenCaptureProcessor](https://developer.android.com/reference/android/support/test/runner/screenshot/ScreenCaptureProcessor)`


`

|---|--------------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.test.runner.screenshot.BasicScreenCaptureProcessor |

<br />

*** ** * ** ***

A basic[ScreenCaptureProcessor](https://developer.android.com/reference/android/support/test/runner/screenshot/ScreenCaptureProcessor)for processing a[ScreenCapture](https://developer.android.com/reference/android/support/test/runner/screenshot/ScreenCapture).

This will perform basic processing on the given[ScreenCapture](https://developer.android.com/reference/android/support/test/runner/screenshot/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](https://developer.android.com/reference/java/lang/String.html) | [mDefaultFilenamePrefix](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#mDefaultFilenamePrefix) <br /> |
| ` protected `[File](https://developer.android.com/reference/java/io/File.html)       | [mDefaultScreenshotPath](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#mDefaultScreenshotPath) <br /> |
| ` protected `[String](https://developer.android.com/reference/java/lang/String.html) | [mFileNameDelimiter](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#mFileNameDelimiter) <br />         |
| ` protected `[String](https://developer.android.com/reference/java/lang/String.html) | [mTag](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#mTag) <br />                                     |

|                                                                              ### Public constructors                                                                               ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[BasicScreenCaptureProcessor](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#BasicScreenCaptureProcessor())`() ` |

|                                                                                                                                                                                                                                                       ### Public methods                                                                                                                                                                                                                                                       ||
|----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[process](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#process(android.support.test.runner.screenshot.ScreenCapture))`(`[ScreenCapture](https://developer.android.com/reference/android/support/test/runner/screenshot/ScreenCapture)` capture) ` Process the given[ScreenCapture](https://developer.android.com/reference/android/support/test/runner/screenshot/ScreenCapture). |

|                                                                                                                                                                                          ### Protected methods                                                                                                                                                                                           ||
|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[getDefaultFilename](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#getDefaultFilename())`() ` Returns the default filename for this class suffixed with a UUID.                                                                                              |
| ` `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[getFilename](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#getFilename(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` prefix) ` Returns the filename created from the given prifix and suffixed with a UUID. |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#)From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                                | | ` boolean`                                                                          | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                             | ` finalize() `                                                                             | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                             | | ` int`                                                                              | ` hashCode() `                                                                             | | ` final void`                                                                       | ` notify() `                                                                               | | ` final void`                                                                       | ` notifyAll() `                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                             | | ` final void`                                                                       | ` wait(long arg0, int arg1) `                                                              | | ` final void`                                                                       | ` wait(long arg0) `                                                                        | | ` final void`                                                                       | ` wait() `                                                                                 | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor#)From interface` `[android.support.test.runner.screenshot.ScreenCaptureProcessor](https://developer.android.com/reference/android/support/test/runner/screenshot/ScreenCaptureProcessor)` ` |-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[process](https://developer.android.com/reference/android/support/test/runner/screenshot/ScreenCaptureProcessor#process(android.support.test.runner.screenshot.ScreenCapture))`(`[ScreenCapture](https://developer.android.com/reference/android/support/test/runner/screenshot/ScreenCapture)` capture) ` Process the given[ScreenCapture](https://developer.android.com/reference/android/support/test/runner/screenshot/ScreenCapture). | ||

## Fields

### mDefaultFilenamePrefix

```
String mDefaultFilenamePrefix
```

<br />

<br />

### mDefaultScreenshotPath

```
File mDefaultScreenshotPath
```

<br />

<br />

### mFileNameDelimiter

```
String mFileNameDelimiter
```

<br />

<br />

### mTag

```
String mTag
```

<br />

<br />

## Public constructors

### BasicScreenCaptureProcessor

```
BasicScreenCaptureProcessor ()
```

<br />

<br />

## Public methods

### process

```
String process (ScreenCapture capture)
```

Process the given[ScreenCapture](https://developer.android.com/reference/android/support/test/runner/screenshot/ScreenCapture).

The given[ScreenCapture](https://developer.android.com/reference/android/support/test/runner/screenshot/ScreenCapture)defines optional properties like filename and format that should be respected when defining the behavior of this method.

<br />

|                                                                                       Parameters                                                                                        ||
|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `capture` | `ScreenCapture`: the[ScreenCapture](https://developer.android.com/reference/android/support/test/runner/screenshot/ScreenCapture)that specifies the bitmap to process <br /> |

|                                                       Returns                                                        ||
|-------------------------------------------------------------------------|---------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String.html) | the filename the bitmap was saved as <br /> |

|                                       Throws                                       ||
|---------------------------------------------------------------------------------|---|
| [IOException](https://developer.android.com/reference/java/io/IOException.html) |   |

## Protected methods

### getDefaultFilename

```
String getDefaultFilename ()
```

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

<br />

|                                     Returns                                     ||
|-------------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String.html) | <br /> |

### getFilename

```
String getFilename (String prefix)
```

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

<br />

|        Parameters         ||
|----------|-----------------|
| `prefix` | `String` <br /> |

|                                     Returns                                     ||
|-------------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String.html) | <br /> |

-

  ## Interfaces

  - [ScreenCaptureProcessor](https://developer.android.com/reference/android/support/test/runner/screenshot/ScreenCaptureProcessor)
-

  ## Classes

  - [BasicScreenCaptureProcessor](https://developer.android.com/reference/android/support/test/runner/screenshot/BasicScreenCaptureProcessor)
  - [ScreenCapture](https://developer.android.com/reference/android/support/test/runner/screenshot/ScreenCapture)
  - [Screenshot](https://developer.android.com/reference/android/support/test/runner/screenshot/Screenshot)
  - [UiAutomationWrapper](https://developer.android.com/reference/android/support/test/runner/screenshot/UiAutomationWrapper)