Ejemplo n.º 1
0
        /// <summary>
        /// Initializes the different native event handlers in Android / iOS
        /// </summary>
        public static void Initialize()
        {
            SoomlaUtils.LogDebug(TAG, "Initializing StoreEvents ...");
#if UNITY_ANDROID && !UNITY_EDITOR
            AndroidJNI.PushLocalFrame(100);
            using (AndroidJavaClass jniEventHandler = new AndroidJavaClass("com.soomla.unity.StoreEventHandler")) {
                jniEventHandler.CallStatic("initialize");
            }
            AndroidJNI.PopLocalFrame(IntPtr.Zero);

            sep = new StoreEventPusherAndroid();
#elif UNITY_IOS && !UNITY_EDITOR
            eventDispatcher_Init();
            sep = new StoreEventPusherIOS();
#endif
        }
Ejemplo n.º 2
0
		/// <summary>
		/// Initializes the different native event handlers in Android / iOS
		/// </summary>
		public static void Initialize() {
			SoomlaUtils.LogDebug (TAG, "Initializing StoreEvents ...");
#if UNITY_ANDROID && !UNITY_EDITOR
			AndroidJNI.PushLocalFrame(100);
			using(AndroidJavaClass jniEventHandler = new AndroidJavaClass("com.soomla.unity.StoreEventHandler")) {
				jniEventHandler.CallStatic("initialize");
			}
			AndroidJNI.PopLocalFrame(IntPtr.Zero);

			sep = new StoreEventPusherAndroid();
#elif UNITY_IOS && !UNITY_EDITOR
			eventDispatcher_Init();
			sep = new StoreEventPusherIOS();
#elif UNITY_WP8 && !UNITY_EDITOR
            BusProvider.Instance.Register(StoreEvents.Instance);
            sep = new StoreEventPusherWP();
#endif
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes the different native event handlers in Android / iOS
        /// </summary>
        public static void Initialize()
        {
            if (Instance == null)
            {
                CoreEvents.Initialize();
                Instance = GetSynchronousCodeGeneratedInstance <StoreEvents>();
                SoomlaUtils.LogDebug(TAG, "Initializing StoreEvents ...");
#if UNITY_ANDROID && !UNITY_EDITOR
                AndroidJNI.PushLocalFrame(100);
                using (AndroidJavaClass jniEventHandler = new AndroidJavaClass("com.soomla.unity.StoreEventHandler")) {
                    jniEventHandler.CallStatic("initialize");
                }
                AndroidJNI.PopLocalFrame(IntPtr.Zero);

                sep = new StoreEventPusherAndroid();
#elif UNITY_IOS && !UNITY_EDITOR
                eventDispatcher_Init();
                sep = new StoreEventPusherIOS();
#elif UNITY_WP8 && !UNITY_EDITOR
                BusProvider.Instance.Register(StoreEvents.Instance);
                sep = new StoreEventPusherWP();
#endif
            }
        }