public static void InstagramShare(string status, Texture2D texture) { switch (Application.platform) { case RuntimePlatform.Android: if (texture != null) { AndroidSocialGate.StartShareIntent("Share", status, texture, "com.instagram.android"); } else { AndroidSocialGate.StartShareIntent("Share", status, "com.instagram.android"); } break; case RuntimePlatform.IPhonePlayer: IOSSocialManager.Instance.InstagramPost(texture, status); break; #if UNITY_4_6 || UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 case RuntimePlatform.WP8Player: #else case RuntimePlatform.WSAPlayerARM: case RuntimePlatform.WSAPlayerX64: case RuntimePlatform.WSAPlayerX86: #endif break; } }
public static void FacebookShare(string message, Texture2D texture) { switch (Application.platform) { case RuntimePlatform.Android: if (texture != null) { AndroidSocialGate.StartShareIntent("Share", message, texture, "facebook.katana"); } else { AndroidSocialGate.StartShareIntent("Share", message, "facebook.katana"); } break; case RuntimePlatform.IPhonePlayer: IOSSocialManager.Instance.FacebookPost(message, null, texture); break; #if UNITY_4_6 || UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 case RuntimePlatform.WP8Player: #else case RuntimePlatform.WSAPlayerARM: case RuntimePlatform.WSAPlayerX64: case RuntimePlatform.WSAPlayerX86: #endif break; } }
public static void ShareMedia(string caption, string message, Texture2D texture) { switch (Application.platform) { case RuntimePlatform.Android: if (texture != null) { AndroidSocialGate.StartShareIntent(caption, message, texture); } else { AndroidSocialGate.StartShareIntent(caption, message); } break; case RuntimePlatform.IPhonePlayer: IOSSocialManager.Instance.ShareMedia(message, texture); break; #if UNITY_4_6 || UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 case RuntimePlatform.WP8Player: #else case RuntimePlatform.WSAPlayerARM: case RuntimePlatform.WSAPlayerX64: case RuntimePlatform.WSAPlayerX86: #endif break; } }
public static void FacebookShare(string message, Texture2D texture) { switch (Application.platform) { case RuntimePlatform.Android: if (texture != null) { AndroidSocialGate.StartShareIntent("Share", message, texture, "facebook.katana"); } else { AndroidSocialGate.StartShareIntent("Share", message, "facebook.katana"); } break; case RuntimePlatform.IPhonePlayer: IOSSocialManager.instance.FacebookPost(message, texture); break; case RuntimePlatform.WP8Player: WP8SocialManager.instance.FacebookPost(message, texture); break; } }
public static void TwitterShare(string status, Texture2D texture) { switch (Application.platform) { case RuntimePlatform.Android: if (texture != null) { AndroidSocialGate.StartShareIntent("Share", status, texture, "twi"); } else { AndroidSocialGate.StartShareIntent("Share", status, "twi"); } break; case RuntimePlatform.IPhonePlayer: IOSSocialManager.instance.TwitterPost(status, null, texture); break; case RuntimePlatform.WP8Player: break; } }
public static void ShareMedia(string caption, string message, Texture2D texture) { switch (Application.platform) { case RuntimePlatform.Android: if (texture != null) { AndroidSocialGate.StartShareIntent("Share", message, texture); } else { AndroidSocialGate.StartShareIntent("Share", message); } break; case RuntimePlatform.IPhonePlayer: IOSSocialManager.instance.ShareMedia(message, texture); break; case RuntimePlatform.WP8Player: WP8SocialManager.instance.ShareMedia(message, texture); break; } }
public static void InstagramShare(string status, Texture2D texture) { switch (Application.platform) { case RuntimePlatform.Android: if (texture != null) { AndroidSocialGate.StartShareIntent("Share", status, texture, "com.instagram.android"); } else { AndroidSocialGate.StartShareIntent("Share", status, "com.instagram.android"); } break; case RuntimePlatform.IPhonePlayer: IOSSocialManager.Instance.InstagramPost(texture, status); break; case RuntimePlatform.WP8Player: break; } }
public void ShareTexture() { #if UNITY_IOS IOSSocialManager.instance.ShareMedia("Timi's Playground", (Texture2D)textureToSave.mainTexture); #elif UNITY_ANDROID AndroidSocialGate.StartShareIntent("Timi's Playground", "Timi's Playground", (Texture2D)textureToSave.mainTexture); #endif }
public void NativeInvite(Texture2D tex) { #if UNITY_IOS IOSSocialManager.OnMediaSharePostResult += HandleOnShareCallback; IOSSocialManager.Instance.ShareMedia(string.Format("{0} #{1}", Constants.ShareURLLink(Constants.ShareCodes.Native), Constants.HashTagSocials), tex); #endif #if UNITY_ANDROID AndroidSocialGate.OnShareIntentCallback += HandleOnShareIntentCallback; AndroidSocialGate.StartShareIntent(LocaliseText.Get("GameName"), string.Format("{0} #{1}", Constants.ShareURLLink(Constants.ShareCodes.Native), Constants.HashTagSocials), tex); #endif }
private IEnumerator CaptureScreenshot(string text, GameObject[] disableObjects, GameObject[] enableObjects) { if (disableObjects != null) { for (int i = 0; i < disableObjects.Length; i++) { disableObjects[i].SetActive(false); } } if (enableObjects != null) { for (int i = 0; i < enableObjects.Length; i++) { enableObjects[i].SetActive(true); } } yield return(new WaitForEndOfFrame()); // Create a texture the size of the screen, RGB24 format int width = Screen.width; int height = Screen.height; Texture2D tex = new Texture2D(width, height, TextureFormat.RGB24, false); // Read screen contents into the texture tex.ReadPixels(new Rect(0, 0, width, height), 0, 0); if (enableObjects != null) { for (int i = 0; i < enableObjects.Length; i++) { enableObjects[i].SetActive(false); } } if (disableObjects != null) { for (int i = 0; i < disableObjects.Length; i++) { disableObjects[i].SetActive(true); } } tex.Apply(); AndroidSocialGate.StartShareIntent("Share", text, tex); Destroy(tex); }
private static void OnFacebookPackageCheckResult(AN_PackageCheckResult res) { if (res.IsSucceeded) { //if is installed lest shared it AndroidSocialGate.StartShareIntent(_shareTitle, _shareContent + " " + _playStoreURL, defaultImageToShare, "facebook.katana"); } else { AndroidMessage msg = AndroidMessage.Create("Share error!", "Please before install facebook app"); } AndroidNativeUtility.OnPackageCheckResult -= OnFacebookPackageCheckResult; }
IEnumerator ShareScreen() { bgLoadCanvasGroup.alpha = 1; bgLoadCanvasGroup.blocksRaycasts = true; Texture2D texture = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, true); texture.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0); texture.Apply(); yield return(new WaitForSeconds(4)); bgLoadCanvasGroup.alpha = 0; bgLoadCanvasGroup.blocksRaycasts = false; AndroidSocialGate.StartShareIntent("Share", "This is my score. Try to Beat me! https://play.google.com/store/apps/details?id=com.Dreamup.Swapper", texture); }
private IEnumerator PostTWScreenshot() { yield return(new WaitForEndOfFrame()); // Create a texture the size of the screen, RGB24 format int width = Screen.width; int height = Screen.height; Texture2D tex = new Texture2D(width, height, TextureFormat.RGB24, false); // Read screen contents into the texture tex.ReadPixels(new Rect(0, 0, width, height), 0, 0); tex.Apply(); AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share", tex, "twi"); Destroy(tex); }
public static void WhatsappShare(string message, Texture2D texture = null) { switch (Application.platform) { case RuntimePlatform.Android: AndroidSocialGate.StartShareIntent(string.Empty, message, texture, "whatsapp"); break; case RuntimePlatform.IPhonePlayer: if (texture == null) { IOSSocialManager.Instance.WhatsAppShareText(message); } else { IOSSocialManager.Instance.WhatsAppShareImage(texture); } break; } }
public static void ShareMedia(string caption, string message, Texture2D[] textures) { switch (Application.platform) { case RuntimePlatform.Android: AndroidSocialGate.StartShareIntent(caption, message, textures); break; case RuntimePlatform.IPhonePlayer: //TODO: Add iOS platform implementation here break; #if UNITY_4_6 || UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 case RuntimePlatform.WP8Player: #else case RuntimePlatform.WSAPlayerARM: case RuntimePlatform.WSAPlayerX64: case RuntimePlatform.WSAPlayerX86: #endif break; } }
public static void TwitterDefaultShare() { AndroidSocialGate.StartShareIntent(_shareTitle, _shareContent + " " + _playStoreURL, defaultImageToShare, "twi"); }
public void PostImage() { AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share", ImageToShare, "twi"); }
private void PostMSG() { AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share", "twi"); }
private void PostImage() { AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share", ImageToShare, "facebook.katana"); }
public void ShareText() { AndroidSocialGate.OnShareIntentCallback += HandleOnShareIntentCallback; AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share https://d45nf.app.goo.gl/QcRv"); //AndroidSocialGate.StartVideoPickerAndShareIntent("message for video", "share the video"); }
public void GoogleShare() { AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share", shareTexture, "com.google.android.apps.plus"); }
public void TwitterShare() { AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share", shareTexture, "twi"); }
public void InstaShare() { AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share", shareTexture, "insta"); }
public void ShareImage() { AndroidSocialGate.StartShareIntent("Hello Share Intent", "Sharing Hello wolrd image", shareTexture); }
public void ShareText() { Debug.Log("ShareText"); AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share"); }
public void ShareText() { AndroidSocialGate.OnShareIntentCallback += HandleOnShareIntentCallback; AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share"); }
public static void NativeSharing() { AndroidSocialGate.StartShareIntent(_shareTitle, _shareContent + " " + _playStoreURL, defaultImageToShare); }
public void ShareText() { AndroidSocialGate.OnShareIntentCallback += HandleOnShareIntentCallback; AndroidSocialGate.StartShareIntent("Hello Share Intent", "This is my text to share https://d45nf.app.goo.gl/QcRv"); }