- Home /
How to share an image using android share functionalities?
Hello,i would like to implement a "share functionality" in my android game like the one found in "hill climb racing".
In this game, at the end of the race, the player can share an image with statistics of the race using android share functionalities.
Is is possible to implement such functionality with Unity? i was thinking about something like this:
if(Application.platform == RuntimePlatform.Android)
{
AndroidJavaClass jc = new AndroidJavaClass("what should go here?");
AndroidJavaObject jo = jc.GetStatic<AndroidJavaObject>("currentActivity");
jo.Call("function to be called?");
}
EDIT: it seems that i have to implement a ShareActionProvider (https://developer.android.com/guide/topics/ui/actionbar.html#ShareActionProvider)
Any help is appreciated.
Thanks.
Answer by leandrovtd · Aug 10, 2018 at 06:41 PM
I believe this can help you:
http://www.theappguruz.com/blog/general-sharing-in-android-ios-in-unity
Your answer
![](https://koobas.hobune.stream/wayback/20220613131954im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
PNG not in .asset 0 Answers
Android Share text and image? 4 Answers
Andriod export problem 0 Answers
Passing texture to android plugin 0 Answers
Share image in Unity Game on Android devices error 2 Answers