// 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 }
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 }
// 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()); }
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 }
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 }
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); }
// 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); } }
public void AppsFlyerInit() { AppsFlyer.setAppsFlyerKey(this._appsFlyerDevKey); AppsFlyer.setAppID(this._androidAppId); AppsFlyer.init(this._appsFlyerDevKey, "AppsFlyerTrackerCallbacks"); UnityEngine.Debug.Log("AppsFlyer initialized"); }
// 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); } }
// 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 }
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()); }
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 }
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(); }
void appsFlyerInit() { AppsFlyer.setAppsFlyerKey("<DEV_KEY>"); AppsFlyer.setIsDebug(true); AppsFlyer.setAppID("<APP_ID>"); AppsFlyer.setIsSandbox(true); AppsFlyer.getConversionData(); AppsFlyer.trackAppLaunch(); }
public void InitializeAppsFlyer() { AppsFlyer.setAppsFlyerKey("zcKrZYJWnrWWctCxcLNnyT"); #if UNITY_IOS AppsFlyer.setAppID("YOUR_APP_ID_HERE"); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID AppsFlyer.setAppID("com.CanvasMobileGames.SuperCasual"); AppsFlyer.init("zcKrZYJWnrWWctCxcLNnyT", "AppsFlyerTrackerCallbacks"); #endif }
private void InitAF() { AppsFlyer.setAppsFlyerKey(devKeyId); AppsFlyer.setIsDebug(isDebug); #if UNITY_ANDROID && !UNITY_EDITOR AppsFlyer.setAppID(androidPackageName); AppsFlyer.init(devKeyId); #elif UNITY_IOS && !UNITY_EDITOR AppsFlyer.setAppID(iosAppId); AppsFlyer.trackAppLaunch(); #endif }
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; } }
public void Initialize() { AppsFlyer.setIsDebug(isDebug); AppsFlyer.setIsSandbox(isSandbox); AppsFlyer.setAppsFlyerKey(devKey); #if UNITY_IOS AppsFlyer.setAppID(iOSAppId); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID AppsFlyer.setAppID(androidAppId); AppsFlyer.init(devKey, "AppsFlyerTrackerCallbacks"); #endif AppsFlyer.trackAppLaunch(); }
private void ConnectAppsFlayer() { AppsFlyer.setAppsFlyerKey("ifZ9pXj7gsWDMy9NMWArJW"); AppsFlyer.setAppID("com.adwa.adwda"); AppsFlyer.init("ifZ9pXj7gsWDMy9NMWArJW", "AppsFlyerTrackerCallbacks"); AppsFlyerTrackerCallbacks.ALounch += () => { Dictionary <string, string> purchaseEvent = new Dictionary <string, string> { ["Name"] = "Yura" }; AppsFlyer.trackRichEvent("I am working", purchaseEvent); }; }
void SetupAppsFlyer() { AppsFlyer.setAppsFlyerKey("AP8P3GvwHgw9NBdBTWAqrb"); /* 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("313131310"); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID /* Mandatory - set your Android package name */ AppsFlyer.setAppID("im.getsocial.demo.unity"); AppsFlyer.init("AP8P3GvwHgw9NBdBTWAqrb");; #endif }
private void Initialize() { AppsFlyer.setAppsFlyerKey(HCConstants.appFlyerDevKey); /* 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(HCConstants.appFlyerAppId); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID /* Mandatory - set your Android package name */ AppsFlyer.setAppID(HCConstants.appFlyerPackageName); /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/ AppsFlyer.init(HCConstants.appFlyerDevKey, "AppsFlyerTrackerCallbacks"); #endif }
// Use this for initialization void Start() { /* Mandatory - set your AppsFlyer’s Developer key. */ AppsFlyer.setAppsFlyerKey(developerKey); /* 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(iOSKey); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID /* Mandatory - set your Android package name */ AppsFlyer.setAppID(androidPackageName); /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/ AppsFlyer.init("YOUR_APPSFLYER_DEV_KEY", "AppsFlyerTrackerCallbacks"); #endif }
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); }
void Start() { /* Mandatory - set your AppsFlyer’s Developer key. */ AppsFlyer.setAppsFlyerKey("8MAzUC3B2BHYVi2uYVHaSd"); /* 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("1480007270"); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID /* Mandatory - set your Android package name */ AppsFlyer.setAppID("com.Lochan.ColorSplat"); /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/ AppsFlyer.init("8MAzUC3B2BHYVi2uYVHaSd", "AppsFlyerTrackerCallbacks"); #endif }
void Start() { /* Mandatory - set your AppsFlyer’s Developer key. */ AppsFlyer.setAppsFlyerKey("WLznhvXz9DFJ3fKSx5jQpZ"); /* 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("com.KenMiller.SpaceColony"); /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/ AppsFlyer.init("WLznhvXz9DFJ3fKSx5jQpZ", "AppsFlyerTrackerCallbacks"); #endif }
// Use this for initialization void Start() { /* Mandatory - set your AppsFlyer’s Developer key. */ AppsFlyer.setAppsFlyerKey("eYNubRbWMdHRGCzbRTk3TfeYNubRbWMdHRGCzbRTk3Tf"); /* 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("1434179130"); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID /* Mandatory - set your Android package name */ AppsFlyer.setAppID("com.UtmostGames.Bulletproof"); /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/ AppsFlyer.init("eYNubRbWMdHRGCzbRTk3Tf", "AppsFlyerTrackerCallbacks"); #endif }
void Start() { /* Mandatory - set your AppsFlyer’s Developer key. */ AppsFlyer.setAppsFlyerKey("zcKrZYJWnrWWctCxcLNnyT"); /* 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("1474653825"); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID /* Mandatory - set your Android package name */ AppsFlyer.setAppID("com.UtmostGames.BoomBalls"); /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/ AppsFlyer.init("zcKrZYJWnrWWctCxcLNnyT", "AppsFlyerTrackerCallbacks"); #endif }
// Use this for initialization void Start() { OneSignal.StartInit("ce38a9e3-5105-41f0-bbe1-da58dacd2628").HandleNotificationOpened(HandleNotificationOpened).EndInit(); /* Mandatory - set your AppsFlyer’s Developer key. */ AppsFlyer.setAppsFlyerKey("LFeZuGb4CiR48y5jvUtGni"); /* 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("blackjack.fruit.game"); AppsFlyer.init("LFeZuGb4CiR48y5jvUtGni"); #endif }
void Start() { /* Mandatory - set your AppsFlyer’s Developer key. */ AppsFlyer.setAppsFlyerKey("VZNM46nRRK4oBmMs3zdqdG"); // AppsFlyer.setAppsFlyerKey("zcKrZYJWnrWWctCxcLNnyT"); /* 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("1465179638"); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID /* Mandatory - set your Android package name */ AppsFlyer.setAppID("YOUR_ANDROID_PACKAGE_NAME_HERE"); /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/ AppsFlyer.init("YOUR_APPSFLYER_DEV_KEY", "AppsFlyerTrackerCallbacks"); #endif }
public void Init(params string[] args) { //Mandatory - set your AppsFlyer’s Developer key. string appflyerKey = args[0]; string appId = args[1]; if (appflyerKey == "" || appId == "") { return; } AppsFlyer.setAppsFlyerKey(appflyerKey); //AppsFlyer.setIsDebug(true); #if UNITY_IOS AppsFlyer.setAppID(appId); AppsFlyer.trackAppLaunch(); #elif UNITY_ANDROID //Mandatory - set your Android package name AppsFlyer.setAppID(appId); AppsFlyer.init(appflyerKey); #endif InitSuccess = true; #if DEVELOPMENT_BUILD AppsFlyer.setIsSandbox(true); #endif #if APPSFLYER_UNINSTALL_EVENT #if USE_FIREBASE_MESSAGING && UNITY_ANDROID if (AFramework.FirebaseService.FirebaseMessaging.FirebaseMessagingToken == null || AFramework.FirebaseService.FirebaseMessaging.FirebaseMessagingToken.Length <= 0) { AFramework.FirebaseService.FirebaseMessaging.EventOnTokenReceived += OnFirebaseMessagingTokenReceived; } else { AppsFlyer.updateServerUninstallToken(AFramework.FirebaseService.FirebaseMessaging.FirebaseMessagingToken); } #elif UNITY_IOS UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge | UnityEngine.iOS.NotificationType.Sound, true); TrackingManager.I.StartCoroutine(CRWaitForNotificationToken()); #endif #endif }