ScreenshotUtils
object ScreenshotUtils
Types
Link copied to clipboard
interface PixelCopyListener
Functions
Link copied to clipboard
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
Link copied to clipboard
Takes a screenshot of passed view Use this method when API level < 26, otherwise use takeScreenshot(view: View, window: Window, listener: PixelCopyListener)
Takes a screenshot of passed view using PixelCopy API Use this method when API level >= 26
Link copied to clipboard
Takes a screenshot using rootView of passed view Use this method when API level < 26, otherwise use takeScreenshot(view: View, window: Window, listener: PixelCopyListener)