Пример #1
0
 public void adsPlayBackEvent()
 {
     AppsFlyer.trackRichEvent(AFInAppEvents.CONTENT_VIEW, new Dictionary <string, string>()
     {
         { AFInAppEvents.CONTENT_ID, "Ads_WatchNum" },
     });
 }
Пример #2
0
    public void Init()
    {
        //GooglePlay以外平台如amzon平台,发布时需要调用该api
#if UNITY_ANDROID && !UNITY_EDITOR
        UPTraceApi.setCustomerIdForAndroid(GetAndroidID());
#endif

        //欧盟用户展示gdpr弹窗,并在用户拒绝时调用disableAccessPrivacyInformation()
        //UPTraceApi.disableAccessPrivacyInformation();

        //正式包请关闭该debug
        UPTraceApi.enalbeDebugMode(true);

        //init TraceSDK
        UPTraceApi.initTraceSDK(PRODUCTID, CHANNELID);

        //在线时长上报
        OnlineReport();


        //appsflyer
        AppsFlyer.setIsDebug(true);

        AppsFlyer.initSDK(AF_DEV_KEY, AF_APPID, this);


        //iOS 延迟调用上报,目的是确保首次上报在ATT弹窗获得结果之后
#if UNITY_IOS && !UNITY_EDITOR
        AppsFlyeriOS.waitForATTUserAuthorizationWithTimeoutInterval(60);
#endif
        AppsFlyer.startSDK();
    }
Пример #3
0
    void runGameover()
    {
        if (runOnce)
        {
            return;
        }

        runOnce = true;

        //save score/bestScore
        int lastBestScore = PlayerPrefs.GetInt("PlayerBestScore");

        if (playerScore > lastBestScore)
        {
            //save new best score
            PlayerPrefs.SetInt("PlayerBestScore", (int)playerScore);
            uiPlayerBestScore.GetComponent <TextMesh> ().text = ((int)playerScore).ToString();
        }

        //Send the score the global leader board
        Social.ReportScore((long)playerScore, GPGSIds.leaderboard_global_leader_board, (bool success) => {
            // handle success or failure
        });

        //Tract an event with the player's score
        AppsFlyer.trackEvent("score", playerScore.ToString());

        enableUI(true);

        //show an Ad on screen every 1 out of 5 gameover
        //if (Random.value > 0.80f) {
        //if (AdManagerObject)
        //AdManagerObject.GetComponent<AdManager> ().showInterstitial ();
        //}
    }
Пример #4
0
 public void AppsFlyerInit()
 {
     AppsFlyer.setAppsFlyerKey(this._appsFlyerDevKey);
     AppsFlyer.setAppID(this._androidAppId);
     AppsFlyer.init(this._appsFlyerDevKey, "AppsFlyerTrackerCallbacks");
     UnityEngine.Debug.Log("AppsFlyer initialized");
 }
Пример #5
0
 public override System.Collections.Generic.IEnumerator <byte> OnScreenTransition(int index, int screenId, int toScreenId, bool popup)
 {
                 #if APPSFLYER_ANALYTICS_API
     AppsFlyer.trackEvent("ScreenTransition", string.Format("{0} (ID: {1}) to {2} (ID: {3})", FlowSystem.GetWindow(screenId).title, screenId, FlowSystem.GetWindow(toScreenId).title, toScreenId));
                 #endif
     yield return(0);
 }
Пример #6
0
    // Use this for initialization
    void Start()
    {
        Screen.orientation = ScreenOrientation.Portrait;

                #if UNITY_IOS
        AppsFlyer.setAppsFlyerKey("YOUR_DEV_KEY");
        AppsFlyer.setAppID("YOUR_APP_ID");
        AppsFlyer.setIsDebug(true);
        AppsFlyer.getConversionData();
        AppsFlyer.trackAppLaunch();
                #elif UNITY_ANDROID
        // if you are working without the manifest, you can initialize the SDK programatically.
        AppsFlyer.init("YOUR_DEV_KEY");
        AppsFlyer.setIsDebug(true);

        // un-comment this in case you are not working with the android manifest file
        AppsFlyer.setAppID("YOUR_PACKAGE_NAME");

        // for getting the conversion data
        AppsFlyer.loadConversionData("AppsFlyerTrackerCallbacks", "didReceiveConversionData", "didReceiveConversionDataWithError");

        // for in app billing validation
//		AppsFlyer.createValidateInAppListener ("AppsFlyerTrackerCallbacks", "onInAppBillingSuccess", "onInAppBillingFailure");
                #endif
    }
Пример #7
0
    public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e)
    {
        //CrossPlatformValidator crossPlatformValidator = new CrossPlatformValidator(GooglePlayTangle.Data(), AppleTangle.Data(), Application.identifier);
        string receipt         = e.purchasedProduct.receipt;
        string isoCurrencyCode = e.purchasedProduct.metadata.isoCurrencyCode;
        int    amount          = decimal.ToInt32(e.purchasedProduct.metadata.localizedPrice * 100m);
        bool   num             = e.purchasedProduct.definition.id.Contains("coins");
        string itemType        = num ? "coins" : "tank";
        string cartType        = num ? "shop" : "garage";
        string storeSpecificId = e.purchasedProduct.definition.storeSpecificId;

        try
        {
            //crossPlatformValidator.Validate(receipt);
            ProcessPurchase(storeSpecificId);
        }
        catch (Exception)
        {
            TankAnalytics.InvalidPurchase();
        }
        PayloadAndroid payloadAndroid = JsonUtility.FromJson <PayloadAndroid>(JsonUtility.FromJson <Receipt>(receipt).Payload);

        //GameAnalytics.NewBusinessEventGooglePlay(isoCurrencyCode, amount, itemType, storeSpecificId, cartType, payloadAndroid.json, payloadAndroid.signature);
        AppsFlyer.validateReceipt("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArDKTBCIaRoT2n1QI1wS/JRep9iSS3AcqQ4Z0Udr5bCxcf0594aY3P39rpfnbRdJUCFjo150j9c1ZKuL0V8rnWOzwRNqdSvPtwiyQNztsQrMG5LkirW61VLCt8kIhpLd0osBeH585s4VV7FBe1m7u6+S98bM1TVm+Ows2/OoXXydyDpcaRaMsNAcM0bt4hWFcRTndwLalmyWHUYJ1tj9N/agtsX6nbBG2uF1Lc7iEH2UoY0VtaXGZdo5tCEHdx+58abxfcuVwHauH7ZzX8jlURDXPy1K0Fi9Ag6IKzrWFEmAjqAjYnmrD3tgHMJEIsKx/OoVI6+AaEfF4nRmejdt6KQIDAQAB", payloadAndroid.json, payloadAndroid.signature, e.purchasedProduct.metadata.localizedPrice.ToString(), e.purchasedProduct.metadata.isoCurrencyCode, null);
        return(PurchaseProcessingResult.Complete);
    }
Пример #8
0
    void Start()
    {
        // register to push notifications
        //UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge | UnityEngine.iOS.NotificationType.Sound);
        //Screen.orientation = ScreenOrientation.Portrait;


        /* Mandatory - set your AppsFlyer’s Developer key. */
        AppsFlyer.setAppsFlyerKey("<AF_DEV_KEY>");

        /* For detailed logging */
        AppsFlyer.setIsDebug(true);

#if UNITY_IOS
        AppsFlyer.setAppID("123456789");
        AppsFlyer.getConversionData();

        AppsFlyer.trackAppLaunch();
#elif UNITY_ANDROID
        /* Mandatory - set your Android package name */

        AppsFlyer.setAppID("com.appsflyer.unitysampleapp");

        /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/

        AppsFlyer.init("AF_DEY_KEY", "AppsFlyerTrackerCallbacks");
#endif
    }
Пример #9
0
    private void Start()
    {
        GameAnalytics.Initialize();

        if (!FB.IsInitialized)
        {
            FB.Init(InitCallback, OnHideUnity);
        }
        else
        {
            FB.ActivateApp();
        }


        /* Mandatory - set your AppsFlyer’s Developer key. */
        AppsFlyer.setAppsFlyerKey("1509259545");//Burayı değiştirmiyoruz
        /* For detailed logging */
        /* AppsFlyer.setIsDebug (true); */
#if UNITY_IOS
        /* Mandatory - set your apple app ID
         * NOTE: You should enter the number only and not the "ID" prefix */

        AppsFlyer.setAppID("1500867328"); //Buraya appstore id girilecek !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        AppsFlyer.getConversionData();
        AppsFlyer.trackAppLaunch();
#elif UNITY_ANDROID
        /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/
        AppsFlyer.init("YOUR_APPSFLYER_DEV_KEY", "AppsFlyerTrackerCallbacks");
#endif


        //Start kısmına kod yazmayalım
        StartCoroutine(WaitInitialize());
    }
Пример #10
0
    public static void Purchase(string m_MapKey, string m_Key, string m_valoue)
    {
        Dictionary <string, string> eventValue = new Dictionary <string, string>();

        eventValue.Add(m_Key, m_valoue);
        AppsFlyer.trackRichEvent(m_MapKey, eventValue);
    }
Пример #11
0
 public void onAppOpenAttributionFailure(string error)
 {
     Toast("onAppOpenAttributionFailure: " + error);
     printDebugLog("onAppOpenAttributionFailure: " + error);
     AppsFlyer.AFLog("[PAZ] onAppOpenAttributionFailure", error);
     deeplink.text = error;
 }
Пример #12
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            //go to background when pressing back button
                        #if UNITY_ANDROID
            AndroidJavaObject activity =
                new AndroidJavaClass("com.unity3d.player.UnityPlayer")
                .GetStatic <AndroidJavaObject>("currentActivity");
            activity.Call <bool>("moveTaskToBack", true);
                        #endif
        }


                #if UNITY_IOS
        if (!tokenSent)
        {
            byte[] token = UnityEngine.iOS.NotificationServices.deviceToken;
            if (token != null)
            {
                //For iOS uninstall
                AppsFlyer.registerUninstall(token);
                tokenSent = true;
            }
        }
                #endif
    }
 public void onAppOpenAttributionFailure(string error)
 {
     if (isDebug)
     {
         AppsFlyer.AFLog("onAppOpenAttributionFailure", error);
     }
 }
 public void onConversionDataFail(string error)
 {
     if (isDebug)
     {
         AppsFlyer.AFLog("didReceiveConversionDataWithError", error);
     }
 }
Пример #15
0
 public void CustomEventDic(string eventId, Dictionary <string, string> dic)
 {
     if (dic != null)
     {
         AppsFlyer.trackRichEvent(eventId, dic);
     }
 }
Пример #16
0
    // Use this for initialization
    void Start()
    {
        //Mandatory - set your AppsFlyer’s Developer key.
        AppsFlyer.setAppsFlyerKey("ZmysHsNw9VtBeDmP4maYab"); //
        // For detailed logging
        //AppsFlyer.setIsDebug (true);
#if UNITY_IOS
        //Mandatory - set your apple app ID
        AppsFlyer.setAppID("YOUR_APP_ID_HERE");
        AppsFlyer.trackAppLaunch();
#elif UNITY_ANDROID
        //Mandatory - set your Android package name
        AppsFlyer.setAppID(Application.bundleIdentifier);
        AppsFlyer.init("ZmysHsNw9VtBeDmP4maYab");
        AppsFlyer.setGCMProjectNumber("60588766610");
#endif
        //For getting the conversion data in Android, you need to this listener.
        AppsFlyer.loadConversionData(name, "didReceiveConversionData", "didReceiveConversionDataWithError");
        AppsFlyer.createValidateInAppListener(name, "onInAppBillingSuccess", "onInAppBillingFailure");

        string[] keys;
        string[] values;

        if (!PlayerPrefs.HasKey("AppsFlyAnalytics"))
        {
            PlayerPrefs.SetInt("AppsFlyAnalytics", 1);
            keys   = new string[] { "status" };
            values = new string[] { "new" };
            TrackEvent("NewUser", keys, values);
        }
    }
Пример #17
0
            protected override void Init()
            {
                                #if UNITY_IOS
                Core.Debugging.Debugger.Log("WaffleAppsFlyer init", (int)SharedSystems.Systems.APPS_FLYER);

                AppsFlyer.setAppsFlyerKey(Utils.EmbededCoreConfig.APPSFLYER_DEV_KEY);
                AppsFlyer.setAppID(Utils.EmbededCoreConfig.APPSFLYER_APP_ID);

                // For detailed logging
                AppsFlyer.setIsDebug(true);

                // For getting the conversion data will be triggered on AppsFlyerTrackerCallbacks.cs file
                AppsFlyer.getConversionData();

                // For testing validate in app purchase (test against Apple's sandbox environment
                AppsFlyer.setIsSandbox(true);

                AppsFlyer.trackAppLaunch();
                                #elif UNITY_ANDROID
                AppsFlyer.init(Utils.EmbededCoreConfig.APPSFLYER_DEV_KEY);
                AppsFlyer.setAppID(Utils.EmbededCoreConfig.ANDROID_PACKAGE_NAME);

                AppsFlyer.setIsDebug(true);
                //AppsFlyer.createValidateInAppListener ("AppsFlyerTrackerCallbacks", "onInAppBillingSuccess", "onInAppBillingFailure");
                                #pragma warning disable 618
                AppsFlyer.loadConversionData("AppsFlyerTrackerCallbacks", "didReceiveConversionData", "didReceiveConversionDataWithError");
                                #pragma warning restore 618
                                #endif
            }
Пример #18
0
        public override void HandleNotification(INotification notification)
        {
            var msgName = notification.name;

            switch (msgName)
            {
            case IAP_MSG.PURCHASE_SUCCESS:
                //////////////////////////////////////////////////////////////
                //// 应用内事件:记录购买的产品 ///////////////////////////////////
                //////////////////////////////////////////////////////////////
                // 只要购买成功, NonComsumable 类型的产品的购买信息,会被 komal 框架记录下来。可以通过
                // SDKManager.Instance.IsPurchased("remove_ads"); 这样的接口获取状态;
                IAPSuccessResult result = (IAPSuccessResult)notification.body;
                var product             = result.product;     // Unity IAP 返回的产品数据结构;
                var productKey          = result.productKey;  // 配置 IDConfig.cs 中用于程序购买的关键字(remove_ads)
                var productItem         = result.productItem; // 配置 IDConfig.cs 中,在 app store 上填写的信息;
                // 不是恢复购买的情况下
                if (!result.isRestore)
                {
                    // 向 AppsFlyer 发送消息
                    this.SendPurchaseEvent(productItem.ID,
                                           productItem.Type,
                                           productItem.Price.ToString(),
                                           productItem.Currency);
                }
                break;

            case MSG_GAMECENTER.GAMECENTER_LOGIN_SUCCESS:
                //////////////////////////////////////////////////////////////
                //// 应用内事件:记录登陆成功事件 /////////////////////////////////
                //////////////////////////////////////////////////////////////
                AppsFlyer.trackRichEvent("af_login", null);
                break;
            }
        }
Пример #19
0
    void Start()
    {
        AppsFlyer.setAppsFlyerKey("yHiUWGDALquAxRVr3LCn8V");
        #if UNITY_IOS
        AppsFlyer.setAppID("yHiUWGDALquAxRVr3LCn8V");
        AppsFlyer.trackAppLaunch();
        #elif UNITY_ANDROID
        AppsFlyer.setAppID("com.qwe.qwe-Standalone");
        AppsFlyer.init("yHiUWGDALquAxRVr3LCn8V", "AppsFlyerTrackerCallbacks");
        #endif

        StartCoroutine(appFlyerCor());


        OneSignal.StartInit("f512932f-26c4-4060-82bc-ee1a54a2d5d7")
        .HandleNotificationOpened(HandleNotificationOpened)
        .EndInit();

        OneSignal.SetLogLevel(OneSignal.LOG_LEVEL.DEBUG, OneSignal.LOG_LEVEL.DEBUG);

        OneSignal.inFocusDisplayType = OneSignal.OSInFocusDisplayOption.Notification;


        var webViewGameObject = new GameObject("UniWebView");
        webView = webViewGameObject.AddComponent <UniWebView>();

        webView.toolBarShow = true;
        webView.Load("https://google.com");
        webView.Show();
    }
Пример #20
0
    // Use this for initialization
    void Start()
    {
        Debug.Log("ctrAnalyticsClass start");



        //local notification for iOS
        //tokenSent = false;
#if UNITY_IOS
        NotificationServices.RegisterForNotifications(
            NotificationType.Alert |
            NotificationType.Badge |
            NotificationType.Sound);
#endif


        //AppsFlyer
        /* Mandatory - set your AppsFlyer’s Developer key. */
        Debug.Log("AppsFlyer init");
        AppsFlyer.setAppsFlyerKey("Ura5UVbFB3YXvaig2PnvPA");
        /* For detailed logging */

        //AppsFlyer.setIsDebug (true);
#if UNITY_IOS
        /* Mandatory - set your apple app ID
         * NOTE: You should enter the number only and not the "ID" prefix */
        AppsFlyer.setAppID("1440167499");
        AppsFlyer.trackAppLaunch();
#elif UNITY_ANDROID
        /* Mandatory - set your Android package name */
        AppsFlyer.setAppID("com.evogames.feedthespider");
        /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/
        AppsFlyer.init("Ura5UVbFB3YXvaig2PnvPA", "AppsFlyerTrackerCallbacks");
#endif
    }
Пример #21
0
    // Use this for initialization
    void Start()
    {
        AppsFlyer.setAppsFlyerKey("YOUR_APPSFLYER_DEV_KEY_HERE");

                #if UNITY_IOS
        AppsFlyer.setAppID("YOUR_APPLE_APP_ID_HERE");
        AppsFlyer.setIsDebug(true);
        AppsFlyer.getConversionData();
        AppsFlyer.trackAppLaunch();
                #elif UNITY_ANDROID
        // All Initialization occur in the override activity defined in the mainfest.xml, including track app launch
        // You can define AppsFlyer library here use this commented out code.

        // un-comment this in case you are not working with the android manifest file
        //AppsFlyer.setAppID ("YOUR_ANDROID_PACKAGE_NAME_HERE");

        // for getting the conversion data
        //AppsFlyer.loadConversionData("AppsFlyerTrackerCallbacks","didReceiveConversionData", "didReceiveConversionDataWithError");

        // for in app billing validation
        //AppsFlyer.createValidateInAppListener ("AppsFlyerTrackerCallbacks", "onInAppBillingSuccess", "onInAppBillingFailure");

        //AppsFlyer.trackAppLaunch ();
                #endif


        print("AppsFlyerId = " + AppsFlyer.getAppsFlyerId());
    }
Пример #22
0
    // Use this for initialization
    void Start()
    {
        if (obj == null)
        {
            obj = this.gameObject;
            DontDestroyOnLoad(this.gameObject);

            /* Mandatory - set your AppsFlyer’s Developer key. */
            AppsFlyer.setAppsFlyerKey("GQCQdRAEjrJcXTfZHVtw77");
            /* For detailed logging */
            /* AppsFlyer.setIsDebug (true); */
            #if UNITY_IOS
            /* Mandatory - set your apple app ID
             * NOTE: You should enter the number only and not the "ID" prefix */
            AppsFlyer.setAppID("YOUR_APP_ID_HERE");
            AppsFlyer.trackAppLaunch();
            #elif UNITY_ANDROID
            /* Mandatory - set your Android package name */
            AppsFlyer.setAppID(ANDROID_PACKAGE_NAME_HERE);
            /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/
            AppsFlyer.init("GQCQdRAEjrJcXTfZHVtw77", "AppsFlyerTrackerCallbacks");
            #endif
        }
        else
        {
            Destroy(this.gameObject);
        }
    }
Пример #23
0
 public void InitializeAppsFlyer()
 {
     if (!base.Inited)
     {
         AppsFlyer.initSDK("nr8SibwpFjcKGBQNpDdttd", "com.futureplay.minecraft");
         AppsFlyer.setCustomerUserId(PlayerData.Instance.PlayerId);
         AppsFlyer.trackAppLaunch();
         PlayerData.Instance.DaysRetained.Skip(1).Subscribe(delegate(int days)
         {
             AppsFlyer.trackRichEvent("Retained_Day", new Dictionary <string, string>
             {
                 {
                     "Day",
                     days.ToString()
                 }
             });
         });
         (from res in PersistentSingleton <AdService> .Instance.AdResults
          where res.result == AdService.V2PShowResult.Finished
          select res).Subscribe(delegate(AdWatched adWatched)
         {
             AppsFlyer.trackRichEvent("Ad_Watched", adWatched.asDictionary());
         });
         base.Inited = true;
     }
 }
    public void Ad_Click(string _type)
    {
        Dictionary <string, string> eventValue = new Dictionary <string, string>();

        eventValue.Add("af_adrev_ad_type", _type);
        AppsFlyer.trackRichEvent("af_ad_click", eventValue);
    }
Пример #25
0
 public override System.Collections.Generic.IEnumerator <byte> SetUserId(string id)
 {
                 #if APPSFLYER_ANALYTICS_API
     AppsFlyer.setCustomerUserID(id.ToString());
                 #endif
     yield return(0);
 }
    void Start()
    {
        Application.runInBackground = true;
        Screen.orientation          = ScreenOrientation.Portrait;
        DontDestroyOnLoad(this);
        AppsFlyer.setIsDebug(true);

#if UNITY_IOS
        AppsFlyer.setAppsFlyerKey(DEV_KEY);
        AppsFlyer.setAppID(APP_ID);
        AppsFlyer.setIsDebug(true);
        AppsFlyer.getConversionData();
        AppsFlyer.trackAppLaunch();

        // register to push notifications for iOS uninstall
        UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge | UnityEngine.iOS.NotificationType.Sound);
        Screen.orientation = ScreenOrientation.Portrait;
#elif UNITY_ANDROID
        AppsFlyer.init("WdpTVAcYwmxsaQ4WeTspmh");

        //AppsFlyer.setAppID ("YOUR_APP_ID");

        // for getting the conversion data
        AppsFlyer.loadConversionData("StartUp");

        // for in app billing validation
//		 AppsFlyer.createValidateInAppListener ("AppsFlyerTrackerCallbacks", "onInAppBillingSuccess", "onInAppBillingFailure");

        //For Android Uninstall
        //AppsFlyer.setGCMProjectNumber ("YOUR_GCM_PROJECT_NUMBER");
#endif
    }
Пример #27
0
    public void nextLevel()
    {
        string eventName = "af_fakeImpression";
        Dictionary <string, string> eventParams = new Dictionary <string, string>()
        {
            { "imp", "1" }
        };

        AppsFlyer.trackRichEvent(eventName, eventParams);
        Debug.Log("MAGIC");
        if (scenesInBuild.Contains(_nextlevel))
        {
            //Debug.Log("YES");
            SceneManager.LoadScene(_nextlevel, LoadSceneMode.Single);
        }
        else
        {
            //Debug.Log("error");
            SceneManager.LoadScene("Main", LoadSceneMode.Single);
        }

        /* int a = lvlname[2] - '0' + 1;
         * //    if (string.Compare(lvlname[2].ToString(),"9")==0 && scenesInBuild.Contains(lvlname[0].ToString() + ((lvlname[2] - '0' + 1)).ToString() + lvlname[3].ToString() + lvlname[4].ToString() + ('1').ToString()))
         * //    {
         * //        SceneManager.LoadScene(lvlname[0].ToString() + ((lvlname[1] - '0' + 1)).ToString() + ('0').ToString() + lvlname[3].ToString() + lvlname[4].ToString() + ('1').ToString(), LoadSceneMode.Single);
         * //
         * //        lvlname[4] = lvlname[4] != '0' ? '0' : '0';
         * //        if (string.Compare(PlayerPrefs.GetString("LEVEL"), lvlname[0].ToString() + ((lvlname[1] - '0' + 1)).ToString() + ('0').ToString() + lvlname[3].ToString() + lvlname[4].ToString() + ('1').ToString()) <= 0)
         * //        {
         * //            PlayerPrefs.SetString("LEVEL", lvlname[0].ToString() + ((lvlname[1] - '0' + 1)).ToString() + ('0').ToString() + lvlname[3].ToString() + lvlname[4].ToString() + ('1').ToString());
         * //           Debug.Log("here1");
         * //        }
         * //        else
         * //            Debug.Log("BAD1");
         * //   }
         * if (a > 9)
         * {
         *       //lvlname[4] = (char)(a / 10);
         *       //lvlname[5] = (char)(a % 10);
         *       SceneManager.LoadScene(lvlname[0].ToString()+a.ToString()+lvlname[3].ToString()+('0').ToString()+('1').ToString(), LoadSceneMode.Single);
         *   PlayerPrefs.SetString("LEVEL","l0-01");
         * }
         *
         * else if (scenesInBuild.Contains(lvlname[0].ToString() + lvlname[1].ToString() + ((lvlname[2] - '0' + 1)).ToString() + lvlname[3].ToString() + lvlname[4].ToString() + ('1').ToString()))
         * {
         *   SceneManager.LoadScene(lvlname[0].ToString() + lvlname[1].ToString() + ((lvlname[2] - '0' + 1)).ToString() + lvlname[3].ToString() + lvlname[4].ToString() + ('1').ToString(), LoadSceneMode.Single);
         *
         *   lvlname[4]=lvlname[4] != '0' ? '0' : '0';
         *   if (string.Compare(PlayerPrefs.GetString("LEVEL"), lvlname[0].ToString() + lvlname[1].ToString() + ((lvlname[2] - '0' + 1)).ToString() + lvlname[3].ToString() + lvlname[4].ToString() + ('1').ToString()) <= 0)
         *   {
         *       PlayerPrefs.SetString("LEVEL", lvlname[0].ToString() + lvlname[1].ToString() + ((lvlname[2] - '0' + 1)).ToString() + lvlname[3].ToString() + lvlname[4].ToString() + ('1').ToString());
         *       Debug.Log("Here2");
         *
         *   }
         *   else
         *       Debug.Log("Bad2");
         * }
         * else
         *   SceneManager.LoadScene("Main", LoadSceneMode.Single);*/
    }
Пример #28
0
        public bool InitWithConfig(SDKConfig config, SDKAdapterConfig adapterConfig)
        {
            var             name            = AppsFlyerTrackerCallbacks.S.name;
            AppsflyerConfig appsflyerConfig = adapterConfig as AppsflyerConfig;

            AppsFlyer.setAppsFlyerKey(appsflyerConfig.appKey);
            if (appsflyerConfig.isDebugMode)
            {
                AppsFlyer.setIsDebug(true);
            }

#if UNITY_IOS
            /* Mandatory - set your apple app ID
             * NOTE: You should enter the number only and not the "ID" prefix */
            AppsFlyer.setAppID(config.iosAppID);
            AppsFlyer.trackAppLaunch();
#elif UNITY_ANDROID
            /* Mandatory - set your Android package name */
            AppsFlyer.setAppID(Application.identifier);
            /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/
            //AppsFlyer.init(appsflyerConfig.appKey, "AppsFlyerTrackerCallbacks");
            AppsFlyer.init(appsflyerConfig.appKey);
            AppsFlyer.loadConversionData("AppsFlyerTrackerCallbacks");
#endif

            return(true);
        }
Пример #29
0
    void Start()
    {
        // For detailed logging
        //AppsFlyer.setIsDebug (true);
#if UNITY_IOS
        //Mandatory - set your AppsFlyer’s Developer key.
        AppsFlyer.setAppsFlyerKey("YOUR_APPSFLYER_DEV_KEY_HERE");
        //Mandatory - set your apple app ID
        //NOTE: You should enter the number only and not the "ID" prefix
        AppsFlyer.setAppID("YOUR_APP_ID_HERE");
        AppsFlyer.trackAppLaunch();
#elif UNITY_ANDROID
        //Mandatory - set your Android package name
        AppsFlyer.setAppID("com.Blast.ColorRing");
        //Mandatory - set your AppsFlyer’s Developer key.
        AppsFlyer.init("aTYJZVwsYCTz8BbnbrDbxL");

        AppsFlyer.setCustomerUserID("965721");



        //For getting the conversion data in Android, you need to this listener.
        //AppsFlyer.loadConversionData("AppsFlyerTrackerCallbacks");
#endif
    }
Пример #30
0
 public void purchaserEvent(int id)
 {
     AppsFlyer.trackRichEvent(AFInAppEvents.PURCHASE, new Dictionary <string, string>()
     {
         { AFInAppEvents.CONTENT_ID, "" + payIDs[id] },
     });
 }