Is it possible to take a screenshot from a hidden layout?

Hi!
I want to make some save menu that add a little picture from a screenshot like many PC games do.
Of course the save menu is hiding the main screen. Is it possible to take a screenshot behind the save menu, or it is impossible on android device?

Not possible....in AI2 (unless there is a clever extension out there that can do it)

I see.
And according to my knowledge only canvas can be saved, arrangements are not, unfortunately.
So i have to figure out something else to solve it. Thank you.

After pressing "screenshot" on the menu, hide the menu, then take a screenshot, show the menu again after taking a screenshot.

Thank you. That is what i'm working on right now. I will report back if it will suffice.

I've just found this:
https://community.kodular.io/t/free-extension-componenttoimage/8553
Lets see if it works.

Ok. This extension of @Jerin_Jacob seems to work, however, if i print the filepath it shows /storage/emulate/0/file.png,
BUT if i open a file browser on the phone i found it in the root dir. Any idea? Is it possible because it is made for Kodular and Kodular is not use the AndoidX lib yet? Or any other problem cause it?
For now, i try to use Taifun's file extension to move it to an other dir.

1 Like

/storage/emulate/0/ - this is the root directory

/storage/emulated/0/

Yes, emulated. I asked because i have this directory in my root also. I don't know which extension created it, but then it means it is /storage/emulated/0/storage/emulated/0/, am i right?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.