I can’t write a function in Android Studio using Kotlin that takes a snapshot of the Android desktop
fun takeViewScreenshot(view: View) {
Toast.makeText(view.context, "Скриншот сохранен", Toast.LENGTH_SHORT).show()
val bitmap = Bitmap.createBitmap(view.width, view.height, Bitmap.Config.ARGB_8888)
val canvas = Canvas(bitmap)
view.draw(canvas)
saveBitmap(bitmap)
}
takes a screenshot of only the current activity, but not the Android desktop
0