I would like to set a certain Drawable as the device\'s wallpaper, but all wallpaper functions accept Bitmaps only. I cannot use WallpaperMan
Drawable
Bitmap
WallpaperMan
android-ktx has Drawable.toBitmap method: https://android.github.io/android-ktx/core-ktx/androidx.graphics.drawable/android.graphics.drawable.-drawable/to-bitmap.html
Drawable.toBitmap
From Kotlin
val bitmap = myDrawable.toBitmap()