Skip to content

Conversation

@noahlessard
Copy link

This is just adding an extra example to the Javaclasswrapper and Android Runtime Plugin doc page, showing how to use an Intent to let the Android gallery know that an image has been saved somewhere on the device.

This is useful when trying to save an image to an Android device, since the image will not show up automatically in the users gallery even if the image has created on the disk. The media scanner must be notified of the image, which is what this code snippet does.

This is also my first godot-docs PR, so apologies if I've missed any requirements to merge. Please let me know and I will address them.

@AThousandShips AThousandShips requested a review from a team October 21, 2025 09:23
@Alex2782
Copy link
Member

these are the warnings that need to be fixed first

/home/runner/work/godot-docs/godot-docs/tutorials/platform/android/javaclasswrapper_and_androidruntimeplugin.rst:138: WARNING: Title underline too short.

Example: Using an Intent to Save an Image to an Android Gallery
~~~~~~~~~~~~~~~~~~~~~~~~~~~ [docutils]
/home/runner/work/godot-docs/godot-docs/tutorials/platform/android/javaclasswrapper_and_androidruntimeplugin.rst:138: WARNING: Title underline too short.

Example: Using an Intent to Save an Image to an Android Gallery
~~~~~~~~~~~~~~~~~~~~~~~~~~~ [docutils]
/home/runner/work/godot-docs/godot-docs/tutorials/platform/android/javaclasswrapper_and_androidruntimeplugin.rst:140: ERROR: Error in "code-block" directive:
maximum 1 argument(s) allowed, 24 supplied.
  • WARNING: Title underline too short.
  • ERROR: Error in "code-block" directive:

@AThousandShips AThousandShips changed the title Add Android Gallery Example to Javaclasswrapper Doc Add Android Gallery Example to JavaClassWrapper Doc Oct 21, 2025
@Calinou Calinou added area:manual Issues and PRs related to the Manual/Tutorials section of the documentation cherrypick:4.5 labels Oct 21, 2025
@syntaxerror247
Copy link
Member

I’m unsure about adding this example. We already have an example that covers intents, and adding another might be unnecessary, even though this one is useful.

@noahlessard
Copy link
Author

noahlessard commented Oct 21, 2025

There are certainly a lot of examples on this page, but I think this one is really important. If a causal Android user wants to access any photos saved by a Godot application, this code would need to be included, as the user shouldn't be expected to download a 3rd party file explorer to access the photo. It also explicitly covers using URIs with Intents, which the other example doesn't show.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:manual Issues and PRs related to the Manual/Tutorials section of the documentation cherrypick:4.5 enhancement platform:android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants