corona-docs
corona-docs copied to clipboard
Saving an image to the gallery does not work for Android 10 and higher versions
display.captureBounds it’s not saving to the Gallery for Android 10 and higher versions. I have tested in my new phone Realme c21 (Android 10) and it does not work. My code do work because I’ve tested it before in my old phone (Android 6).
A portion of my code:
local myImageBounds = {
xMin = imagenDeFondo.contentBounds.xMin,
xMax = imagenDeFondo.contentBounds.xMax,
yMin = imagenDeFondo.contentBounds.yMin,
yMax = imagenDeFondo.contentBounds.yMax
}
local captureObj = display.captureBounds( myImageBounds, true )
I also added the following permission in my build.settings file:
“android.permission.WRITE_EXTERNAL_STORAGE”