The save_png() function works for desktop app on Windows, but not on Android
Is there a way to save a screenshot to my android files?
The save_png() function works for desktop app on Windows, but not on Android
Is there a way to save a screenshot to my android files?
This is the method you're trying to use?
https://docs.godotengine.org/en/4.1/classes/class_image.html#class-image-method-save-png
What value are you using for path? Are you sure it's writable?
DaveTheCoder
I have this code and I have tried different routes but nothing... it doesn't work for me .
I have these permissions checked (just in case)
Access Network State
Access WiFi Status
Camera
Internet
Manage External Storage
Read External Storage
Write External Storage
```
var image = get_viewport().get_texture().get_image()
#print(OS.get_system_dir(OS.SYSTEM_DIR_PICTURES))
DirAccess.make_dir_recursive_absolute("myphoto.png")
image.save_png(OS.get_system_dir(OS.SYSTEM_DIR_PICTURES).path_join("myphoto.png"))
image.save_png(OS.get_system_dir(OS.SYSTEM_DIR_PICTURES).path_join("/myphoto.png"))
image.save_png("storage/DCIM/Camera/myphoto.png") #/storage/emmc/DCIM
image.save_png("/storage/DCIM/Camera/myphoto.png")
image.save_png("/storage/emmc/DCIM/myphoto.png")
Maybe I'm putting the path wrong, but I don't know how to put it.
I would like the image to appear in the Gallery, within the Camera folder
That's getting outside of my knowledge.
Here's the Google documentation. I don't understand all of it, or how to apply it to Godot:
https://developer.android.com/training/data-storage/
It might require creating a custom Android export template.