saveScreenshotAsFile

fun saveScreenshotAsFile(applicationContext: Context, screenshot: Bitmap, callback: FileCreationCallback, screenshotFileName: String = ".jpeg", destDirPath: String = ResourcesHandler.getExternalScopedStoragePath( applicationContext ))

Saves the passed screenshot to a file in the destDirPath

Parameters

applicationContext

the application context

screenshot

the screenshot as a Bitmap

callback

the callback to get screenshot file creation's result

screenshotFileName

the name of the file created for the screenshot (default value is current datetime as yyyy-MM-dd_hh:mm:ss)

destDirPath

the absolute path to the folder where the file will be created (default value is root of the external scoped storage of the app)