Hello,
in my app I use native AS3 libraries to create screeshots of the stage.
I've recently realized that in devices with Android 13 it is not working correctly anymore.
Untill Android 11 it works correctly.
I don't know in Android 12, but I guess it is OK since no user has contacted me to report any bug.
What excatly is not working properly?
I've noticed two anomalies:
- Slim lines placed on the stage to create the frame of a table are disappeared forom the output image of the screenshot.
- Before executing the screenshot, I put a cover movieclip over a row of buttons on the left side of the screen, because I don't want them to be part of the image. Strangely, a part of these buttons remains visible in the output image, whilst the other part is correctly hidden by the cover movieclip.
Do you know the reason of these anomalies since Android 13?
Is there any new way to create screenshots of the stage?
here is my code to generate the screenshot
var bitmapData:BitmapData= new BitmapData(stageW, stageH);
bitmapData.draw(stage)
var quality:int= 100
var je:JPEGEncoderOpt = new JPEGEncoderOpt(quality);
var ba:ByteArray = je.encode(bitmapData);
var newFile:File = folder.resolvePath( "screenshot.jpg");
var fs:FileStream = new FileStream();
fs.addEventListener(Event.CLOSE, fileWritten);
fs.openAsync(newFile, FileMode.WRITE);
fs.writeBytes(ba);
fs.close();