selfie
A simple library to make taking screenshots of your apps.
With the Marshmallow release and the new permissions model, taking screenshots of your applications has become just slightly more complicated as you need to deal with permissions on the run.
This library does it all for you regardless of the device you're running it on.
Usage
Two easy steps:
From the activity you want to take screenshots or the application class initialise the
Selfie
.Call
Selfie
's static methods throughout your app.
Initialising Selfie
new Selfie.Builder()
.format("yyyy-MM-dd_hh:mm:ss")
.path(Environment.getExternalStorageDirectory().toString())
.quality(100)
.build();
- format: Any valid date format according to this.
- path: The pace where you want to store your image in the device. Defaults to Environment.getExternalStorageDirectory()
- quality: The quality you want your screenshot to be created. Must be an int between 0 and 100. See Bitmap Compress
Taking a screenshot
Selfie.snap(MainActivity.this);
Downloading
compile 'uk.co.placona.selfie:selfie:0.0.1'