Closed phatal closed 8 years ago
No. Image only. But it may be possible.
I already write my own small solution to do that :) But I think it will be useful if you can add posibility load video to your plugin, if I understand right it's just need to change type of data from "image/png" or "image/jpg" to "video/mp4" My soluition:
private IEnumerator ShareVideo(string pathToFile)
{
isProcessing = true;
yield return new WaitForEndOfFrame();
if (!Application.isEditor)
{
AndroidJavaClass intentClass = new AndroidJavaClass("android.content.Intent");
AndroidJavaObject intentObject = new AndroidJavaObject("android.content.Intent");
intentObject.Call<AndroidJavaObject>("setAction", intentClass.GetStatic<string> ("ACTION_SEND"));
AndroidJavaClass uriClass = new AndroidJavaClass("android.net.Uri");
AndroidJavaObject uriObject = uriClass.CallStatic<AndroidJavaObject>("parse", pathToFile);
intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_STREAM"), uriObject);
intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_TEXT"), shareText + gameLink);
intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_SUBJECT"), subject);
intentObject.Call<AndroidJavaObject>("setType", "video/mp4");
AndroidJavaClass unity = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject currentActivity = unity.GetStatic<AndroidJavaObject>("currentActivity");
currentActivity.Call("startActivity", intentObject);
}
isProcessing = false;
}`
Great! I'm happy :) Thanks, your soluition. I will modify instagram plugin. Just a moment, I'm preparing right now.
Sorry, I've changed my mind. I'd like to support only a message and a image with SocialWorker. So I can't support video with SocialWorker. Many thanks.
it is a pity, thank you for taking your time to me!
Is it possible to sharing video to instagram, same like we sharing image?