0 votes

I am following the standard practice to get a screenshot / screengrab as described here and I am able to save it using save_png() on Desktop / Ubuntu.

However, the same code is failing on Android, Do I need a special permission to save to a system folder ? I am using Godot 3.2

var fullName = OS.get_system_dir( OS.SYSTEM_DIR_PICTURES ) + "/this_is_a_screen_grab.png"
saveErr :12 fullname :/storage/emulated/0/Pictures/this_is_a_screen_grab.png

12 being : ERRFILECANT_OPEN

Just for testing i i use the user folder it works:

var fullName = OS.get_user_data_dir() + "/this_is_a_screen_grab.png"
saveErr :0 fullname :/data/data/org.godotengine.myGame/files/this_is_a_screen_grab.png

However I am unable to find the picture on the test device Huawei...

Any help Appreciated :-)

asked Apr 4 in Engine by GameVisitor (812 points)

1 Answer

+1 vote
Best answer

From the looks of it, this has been an on-going issue. While the issue has been closed, the latest comment on that issue says that a screenshots can't be taken with the engine.

answered Apr 4 by Ertain (1,097 points)
selected Apr 12 by GameVisitor

Thx for your feedback, but isn't that an important feature ?
Weird it is not functional on mobile...

It probably is. But, AFAIK, the issue still hasn't been fixed (at least on iOS). :-/

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.