Ejemplo n.º 1
0
        private void InitializeGetSocial()
        {
            using (AndroidJavaObject clazz = new AndroidJavaClass("im.getsocial.sdk.core.unity.GetSocialUnityBridge"))
            {
                getSocialJavaObject = clazz.CallStatic <AndroidJavaObject>("initBridge");
            }

            if (getSocialJavaObject.IsJavaNull())
            {
                throw new Exception("Failed to instantiate Android GetSocial SDK");
            }

            if (!AndroidUtils.IsUnityBuildOfGetSocialAndroidSDK())
            {
                throw new Exception(
                          "Wrong version of GetSocial Android SDK is included into the build. BuildConfig.TARGET_PLATFORM != \"UNITY\"");
            }

            // Call OnResume manually first time
            OnResume();
            MainThreadExecutor.Init();
        }