| java.lang.Object | |
| ↳ | androidx.test.runner.screenshot.ScreenCapture |
A ScreenCapture contains a bitmap of a device screen along with a set of ScreenCaptureProcessors that will be used to process the ScreenCapture when process() is called.
If no ScreenCaptureProcessors are added to the list the BasicScreenCaptureProcessor is used when process() is called.
If a set of processors are supplied with the call to process() then those processors
will take precedence over the set of global processors and the BasicScreenCaptureProcessor.
This API is currently in beta.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns the
Bitmap that was set when the ScreenCapture was created. | |||||||||||
Returns the format to save the bitmap as or PNG if none has been set.
| |||||||||||
Returns the filename to save the bitmap as or null if none has been set.
| |||||||||||
Process the
ScreenCapture using the given set of ScreenCaptureProcessors or the
BasicScreenCaptureProcessor if no processors are in the given set. | |||||||||||
Process the
ScreenCapture using the global set of ScreenCaptureProcessors or
the BasicScreenCaptureProcessor if no processors are set. | |||||||||||
Sets the format to save the
ScreenCapture as. | |||||||||||
Sets the filename to save the
ScreenCapture as. | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||
Returns the Bitmap that was set when the ScreenCapture was created.
| Returns | |
|---|---|
Bitmap |
|
Returns the format to save the bitmap as or PNG if none has been set.
| Returns | |
|---|---|
Bitmap.CompressFormat |
|
Returns the filename to save the bitmap as or null if none has been set.
| Returns | |
|---|---|
String |
|
| Returns | |
|---|---|
int |
|
Process the ScreenCapture using the given set of ScreenCaptureProcessors or the
BasicScreenCaptureProcessor if no processors are in the given set.
| Parameters | |
|---|---|
processorSet |
Set: the set of processors to use to process the ScreenCapture |
| Throws | |
|---|---|
IOException |
if there is an IOException while any of the processors are processing the ScreenCapture |
Process the ScreenCapture using the global set of ScreenCaptureProcessors or
the BasicScreenCaptureProcessor if no processors are set.
| Throws | |
|---|---|
IOException |
if there is an IOException while any of the processors are processing the ScreenCapture |
Sets the format to save the ScreenCapture as.
| Parameters | |
|---|---|
format |
Bitmap.CompressFormat: the format to use to save the screenshot as |
| Returns | |
|---|---|
ScreenCapture |
a fluent interface |
Sets the filename to save the ScreenCapture as.
| Parameters | |
|---|---|
filename |
String: the filename to use to save the capture as |
| Returns | |
|---|---|
ScreenCapture |
a fluent interface |