Exemplo n.º 1
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
    }
Exemplo n.º 2
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
            }
Exemplo n.º 3
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);
        }
    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
    }
Exemplo n.º 5
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);
        }
    }
Exemplo n.º 6
0
    /**
     *  This method initializes AppsFlyer SDK with getConversionData callback
     */
    public static void init(string key, string callbackObject)
    {
        AppsFlyer.init(key);

        if (callbackObject != null)
        {
            AppsFlyer.loadConversionData(callbackObject);
        }
    }
Exemplo n.º 7
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
    }