Default Sharing Dialog

As an alternative, you can show standard android sharing dialogue box, and let user decide where to post by his own. The sharing dialogue will look similar to the one on a screenshot bellow:

Text Share Example

AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share");

Tex & Image Share Example

Texture2D image = GetImage();
AndroidSocialGate.StartShareIntent("Hello Share Intent", "Sharing Hello wolrd image", image);

We can provide package name filter, to specify exact app package we want to use for sharing or narrow down suggested apps range. Using package name filter is showed bellow:

Texture2D image = GetImage();
string packageNamePattern = "mail" //all installed mail apps will be sugested
AndroidSocialGate.StartShareIntent("Hello", "Sharing Hello wolrd image", image, packageNamePattern);

The  packageNamePattern variable is used to define the app which will be used for the sharing. So for example, if you using the pattern like  "facebook.katana"  only official facebook app will be used for sharing. And if you will use something like "face" most of the 3-rd party apps for facebook will match this pattern and, in this case, those apps will be also offered to user for sharing. 

If Plugin will not find installed application on the device to match provided pattern,  default sharing dialog will be used.

Note: To share the image using Intent.ACTION_SEND image should be saved on disc and we will provide image URI as Intent.EXTRA_STREAM. We saving to external storage using Images.Media.insertImage. If  external storage isn't available plugin will use internal storage and use FileProvider  for sending content to the another app. But not all social applications support this method. so there is fail possibility with the devices with doesn't have external storage support.


The full API use example can be funded at the SocialSharing example scene.