Share Plugin allows sharing of text and images on Android platform.
For iOS version, visit https://github.com/cengiz-pz/godot-ios-share-plugin .
Follow instructions on the following page to create a custom Android gradle build
There are 2 ways to install the Share
plugin into your project:
Steps:
Share
plugin in Godot EditorDownload
buttonChange Install Folder
setting pointing to your project's root directoryIgnore asset root
checkbox checkedInstall
buttonPlugins
tab of Project->Project Settings...
menu, in the Godot EditorSteps:
Plugins
tab of Project->Project Settings...
menu, in the Godot EditorAdd a Share
node to your scene and follow the following steps:
Share
node to share text or images:
share_text(title, subject, content)
share_image(full_path_for_saved_image_file, title, subject, content)
user://
virtual directory in order to be accessible. The OS.get_user_data_dir()
method can be used to get the absolute path for the user://
directory. See the implementation of share_viewport()
method for sample code.share_viewport(viewport, title, subject, content)
adb logcat
is one of the best tools for troubleshooting unexpected behavior
$> adb logcat | grep 'godot'
on Linux
adb logcat *:W
to see warnings and errorsadb logcat *:E
to see only errorsadb logcat | grep 'godot|somethingElse'
to filter using more than one string at the same time#> adb.exe logcat | select-string "godot"
on powershell (Windows)Also check out: https://docs.godotengine.org/en/stable/tutorials/platform/android/android_plugin.html#troubleshooting
Based on Shin-NiL's Godot Share plugin
Developed by Cengiz
Original repository: Godot Android Share Plugin