コード例 #1
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());
    }
コード例 #2
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
    }
コード例 #3
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
    }
コード例 #4
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
            }
コード例 #5
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());
    }
コード例 #6
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
    }
コード例 #7
0
 void appsFlyerInit()
 {
     AppsFlyer.setAppsFlyerKey("<DEV_KEY>");
     AppsFlyer.setIsDebug(true);
     AppsFlyer.setAppID("<APP_ID>");
     AppsFlyer.setIsSandbox(true);
     AppsFlyer.getConversionData();
     AppsFlyer.trackAppLaunch();
 }
コード例 #8
0
    //******************************//

    void Start()
    {
        AppsFlyer.getConversionData(AFInAppEvents.LEVEL);

        // These fields are set from the editor so do not modify!
        //******************************//
        AppsFlyer.setIsDebug(isDebug);
        AppsFlyer.initSDK(devKey, appID, getConversionData ? this : null);
        //******************************//

        AppsFlyer.startSDK();
    }
コード例 #9
0
 private void Initialize(string trUserId)
 {
     if (!this.initialized)
     {
         AppsFlyer.setIsDebug(ConfigSdk.SDK_DEBUG);
         AppsFlyer.setAppsFlyerKey(ConfigSdk.APPSFLYER_DEV_KEY);
         AppsFlyer.setCustomerUserID(trUserId);
         AppsFlyer.setAppID(ConfigSdk.ANDROID_PACKAGE_NAME);
         AppsFlyer.setIsDebug(ConfigSdk.SDK_DEBUG);
         AppsFlyer.getConversionData();
         this.initialized = true;
     }
 }
コード例 #10
0
 public override System.Collections.Generic.IEnumerator <byte> Auth(string key, ServiceItem serviceItem)
 {
                 #if APPSFLYER_ANALYTICS_API
     AppsFlyer.setIsDebug(this.isDebug);
     AppsFlyer.setAppsFlyerKey(key);
                 #if UNITY_IOS
     AppsFlyer.setAppID(this.iosAppId);
     AppsFlyer.trackAppLaunch();
     AppsFlyer.getConversionData();
     UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge | UnityEngine.iOS.NotificationType.Sound);
                 #elif UNITY_ANDROID
     AppsFlyer.setAppID(this.androidAppId);
     AppsFlyer.init(this.androidDevKey);
     AppsFlyer.setGCMProjectNumber(this.androidGCMProjectNumber);
                 #endif
                 #endif
     yield return(0);
 }
コード例 #11
0
        public void StartBridge()
        {
            /* Mandatory - set your AppsFlyer’s Developer key. */
            AppsFlyer.setAppsFlyerKey("aenSuFdSXYGEa8HyMfspZA");
            /* 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("1435121875");
            AppsFlyerTracker.instance.StartTracker();
            AppsFlyer.getConversionData();
            AppsFlyer.trackAppLaunch();
#elif UNITY_ANDROID
            /* Mandatory - set your Android package name */
            AppsFlyer.setCollectIMEI(true);
            AppsFlyer.setCollectAndroidID(true);
            AndroidJavaClass  up = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
            AndroidJavaObject currentActivity = up.GetStatic <AndroidJavaObject>("currentActivity");
            AndroidJavaObject contentResolver = currentActivity.Call <AndroidJavaObject>("getContentResolver");
            AndroidJavaClass  secure          = new AndroidJavaClass("android.provider.Settings$Secure");
            string            android_id      = secure.CallStatic <string>("getString", contentResolver, "android_id");
            AppsFlyer.setAndroidIdData(android_id);
            AppsFlyer.setAppID(Application.identifier);
            AppsFlyerTracker.instance.StartTracker();
            /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/
            AppsFlyer.init("aenSuFdSXYGEa8HyMfspZA", "AppsFlyerTrackerCallbacks");
            //AppsFlyer.init("ePewqH67ho63AZDuhQYtkP");
#else
            AppsFlyer.setCollectIMEI(true);
            AppsFlyer.setCollectAndroidID(true);
            AppsFlyer.setImeiData(SystemInfo.deviceUniqueIdentifier);
            AppsFlyer.setAppID(Application.identifier);
            AppsFlyerTracker.instance.StartTracker();
            AppsFlyer.init("aenSuFdSXYGEa8HyMfspZA", "AppsFlyerTrackerCallbacks");
#endif

            IsInitialized = true;
        }
コード例 #12
0
    private void InitAppsFlyer()
    {
        /* Mandatory - set your AppsFlyer’s Developer key. */
        AppsFlyer.setAppsFlyerKey("BdP724hHJFraJaxKXvNex7");
        /* 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("1472690984");
        AppsFlyer.getConversionData();
        AppsFlyer.trackAppLaunch();
#elif UNITY_ANDROID
        /* Mandatory - set your Android package name */
        AppsFlyer.setAppID("net.gogame.dusktodawn");
        /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/
        AppsFlyer.init("BdP724hHJFraJaxKXvNex7", "AppsFlyerTrackerCallbacks");

        AppsFlyer.createValidateInAppListener("AppsFlyerTrackerCallbacks", "onInAppBillingSuccess", "onInAppBillingFailure");
#endif
        AFTrackRichEvent("app_open");
    }
コード例 #13
0
    private void Init()
    {
        Application.runInBackground = true;
        DontDestroyOnLoad(this);

    #if UNITY_IOS
        AppsFlyer.setAppsFlyerKey("c6S7FBQfBhj7Do6WTG4jte");
        AppsFlyer.setAppID("1358980931");
        //AppsFlyer.setIsDebug (true);
        AppsFlyer.getConversionData();
        AppsFlyer.trackAppLaunch();
    #elif UNITY_ANDROID
        AppsFlyer.init("c6S7FBQfBhj7Do6WTG4jte");
        //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
    }
コード例 #14
0
    // Use this for initialization
    void Start()
    {
        print("@@@@@ AppsFlyerTrackerCallbacks on Start @@@@@");

#if UNITY_IOS
        AppsFlyer.setAppsFlyerKey(APPSFLAYER_DEV_KEY);
        AppsFlyer.setAppID(APP_PACKAGE_NAME);
        // 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.setAppsFlyerKey(APPSFLAYER_DEV_KEY);
        AppsFlyer.setAppID(APP_PACKAGE_NAME);
        //AppsFlyer.setIsDebug (true);
        //AppsFlyer.createValidateInAppListener ("AppsFlyerTrackerCallbacks", "onInAppBillingSuccess", "onInAppBillingFailure");
        //AppsFlyer.loadConversionData("AppsFlyerTrackerCallbacks","didReceiveConversionData", "didReceiveConversionDataWithError");
#endif

        DontDestroyOnLoad(this.gameObject);
    }