Android Share text and image?

Hi,

I have the following code that allows me to share some text on an android device and it is working fine:

public void DoShare(string text)
	{
		AndroidJavaClass intentClass = new AndroidJavaClass ("android.content.Intent");
		AndroidJavaObject intentObject = new AndroidJavaObject ("android.content.Intent");
		intentObject.Call<AndroidJavaObject> ("setAction", intentClass.GetStatic<string> ("ACTION_SEND"));
		intentObject.Call<AndroidJavaObject> ("setType", "text/plain");
		intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_SUBJECT"), "SUBJECT");
		intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_TEXT"), text);
		AndroidJavaClass unity = new AndroidJavaClass ("com.unity3d.player.UnityPlayer");
		AndroidJavaObject currentActivity = unity.GetStatic<AndroidJavaObject> ("currentActivity");
		currentActivity.Call ("startActivity", intentObject);
	}

but how can I make it so I can share an image as well as the text? Can anyone help me?

Any help is greatly appreciated,
Thanks.

@12boulla
You should be easily able to convert below to JNI calls.

Intent shareIntent = new
Intent(Intent.ACTION_SEND);

String mimeType = “image/*”

// Set MIME type based on the
available content

shareIntent.setType(mimeType);

// Set text here

shareIntent.putExtra(android.content.Intent.EXTRA_TEXT,
message );

// Set image path here

if (!StringUtility.isNullOrEmpty(imagePath))

{

shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(imagePath));

}

The above code is from Cross Platform Native Plugins and you can grab a free copy of Lite version which includes Sharing feature along with many others.
Feature Set

refer this page
http://www.thegamecontriver.com/2015/09/unity-share-post-image-to-facebook.html?showComment=1455523299779#c1485580557316768963

Hi,

I made this tutorial where you can share screenshoots of the game in all Social Media (Facebook, Twitter, Whatsapp, Instagram, Gmail and so on) in less than 20 lines of code just with one single button:

https://youtu.be/EaUsHVO_t5M

Agen Slot Online Terpercaya 2021 - 2022 | Situs Judi Slot Online Terbesar dan Terbaik | Daftar Situs Slot Online Terbaik dan Terlengkap Mansion77

VERY GOOD CONTENT, THANKYOU FOR SHARING!!

https://188.166.207.181/

https://www.flowcode.com/page/mansion77

https://beacons.ai/mansion77

https://www.zoimas.com/profile/mansion77
https://isovle.net/blog/index.php?entryid=19758

SaaS customer success manager, what can you do to ensure users will utilize your SaaS product to the fullest? More importantly, each effort you make for the user contributes to your end goal of improving customer retention?
SaaS Customer Success Solution