-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image.save_png("user://image_name.png") does not save image in reachable location in Android export #45467
Comments
Use the |
See also #39414. |
Okay, so here's how I'm trying to save the image: 1 - Save to "user://".Result: How to access from phone: 2 - Save to OS.get_system_dir(OS.SYSTEM_DIR_PICTURES).Result:
How to access from phone: |
I have managed to save the image in a reachable location, finally. I eventually ended up creating a new directory recursively at "/sdcard/Android/data/org.godotengine.nameofproject/files/" and saved the image there. It seems to also be deleted automatically when I uninstall the app as well. |
To solve this, should we make |
we have already |
Yeah, that was my issue. I couldn't find an answer to that in the docs. |
Godot version:
3.2.3
OS/device including version:
Pixel 2, Android 9
Issue description:
Tried saving an image in the user directory with Image.save_png(). It didn't work. I enabled read/write to external storage perms and asked the user to grant them (the popup appeared). I printed the error code and it was 0. I went into my files but I don't see anything that looks like the image I saved.
Edit: Found the file with adb, but I'm not sure how to get to it by using my phone. I want the images to be saved in a place that the user can easily access them.
Steps to reproduce:
Get the data of the texture of the default icon and save it with Image.save_png().
Minimal reproduction project:
Test.zip
The text was updated successfully, but these errors were encountered: