Shin-NiL / Godot-Android-Share-Plugin

Android share plugin for Godot Game Engine 3.2 or higher

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Donate

GodotShare

This is an Android share plugin for Godot Game Engine 3.2.2 or higher. With that you'll be able to share text and/or images in your apps.

* For Godot < 3.2 or iOS support you can use the old module.

Image Sharing Screenshot

How to use

  • Configure, install and enable the "Android Custom Template" for your project, just follow the official documentation;
  • go to the releases tab, choose a version and download the respective GodotSharePlugin-x.x.x.zip package;
  • extract the zip content (GodotShare.release.aar and GodotShare.gad files) inside the res://android/plugins directory on your Godot project;
  • on the Project -> Export -> Options, turn on the "Use Custom Build" and "Godot Share" on the "Plugins" field;

Export options

ATTENTION: An important note is that the image you want to share must be saved on the "user://" virtual directory root to be accessible, you can use OS.get_user_data_dir() to get its absolute path (required by sharePic). In the demo directory you'll find a working sample project where a screen capture is shared.

Donations

Was this project useful for you? Wanna make a donation? These are the options:

Paypal

My Paypal donation link

Brave browser

Even without spending any money you can still help me installing Brave browser using my referral link. If you do so and keep using the browser, I'll receive some reward.

If you're already a Brave user, please consider donating some BATs ;)

API Reference

The following methods are available:

# Share text
# @param String title
# @param String subject
# @param String text
shareText(title, subject, text)

# Share image
# @param String image_abs_path The image location absolute path
# @param String title
# @param String subject
# @param String text
void sharePic(image_abs_path, title, subject, text)

About

Android share plugin for Godot Game Engine 3.2 or higher

License:MIT License


Languages

Language:Java 100.0%