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 :-)

in Engine by (892 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.

by (3,144 points)
selected by

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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.