コード例 #1
0
		public override void ConfigFileLoadedData (byte[] configData)
		{
			SystemLogger.Log (SystemLogger.Module.PLATFORM, "IPhoneAppsFlyer Module Initialization... loading init options");

			try
			{   // FileStream to read the XML document.
				if (configData != null)
				{
					XmlSerializer serializer = new XmlSerializer(typeof(AppsFlyerInitialization));
					_initOptions = (AppsFlyerInitialization)serializer.Deserialize(new MemoryStream(configData));
				}
			}
			catch (Exception e)
			{
				SystemLogger.Log(SystemLogger.Module.PLATFORM, "Error when loading appsflyers configuration", e);
			}
		}
コード例 #2
0
		/// <summary>
		/// Initialize and Start the tracking system with the App ID and a possible customer app name.
		/// It is automatically called by the platform when launching the app 
		/// (no need to call it from the app code, at least any field needs to be changed at runtime)
		/// </summary>
		/// <param name="initOptions">AppsFlyer Initialization data.</param>
		public void Initialize (AppsFlyerInitialization initOptions)
		{
			SystemLogger.Log (SystemLogger.Module.PLATFORM, "AppsFlyer Initialize");

			try {
				if (initOptions == null) {
					SystemLogger.Log (SystemLogger.Module.PLATFORM, "AppsFlyer Initialize - no init options provided. Cannot initiliaze module.");
					return;
				}

				SystemLogger.Log (SystemLogger.Module.PLATFORM, "AppsFlyer Initialize - DevKey [" + initOptions.DevKey + "]");
				SystemLogger.Log (SystemLogger.Module.PLATFORM, "AppsFlyer Initialize - AppleAppID [" + initOptions.AppID + "]");
				SystemLogger.Log (SystemLogger.Module.PLATFORM, "AppsFlyer Initialize - CustomerID [" + initOptions.CustomerUserID + "]");
				SystemLogger.Log (SystemLogger.Module.PLATFORM, "AppsFlyer Initialize - Currency [" + initOptions.CurrencyCode + "]");
				SystemLogger.Log (SystemLogger.Module.PLATFORM, "AppsFlyer Initialize - IsHTTPS [" + (initOptions.CommunicationsProtocol == CommunicationsProtocol.HTTPS) + "]");

				// Your unique developer ID, which is accessible from your account
				AppsFlyerTracker.SharedTracker.AppsFlyerDevKey = initOptions.DevKey;

				// Your iTunes App 
				AppsFlyerTracker.SharedTracker.AppleAppID = initOptions.AppID;

				if(initOptions.CustomerUserID != null) 
					AppsFlyerTracker.SharedTracker.CustomerUserID = initOptions.CustomerUserID;

				AppsFlyerTracker.SharedTracker.CurrencyCode = initOptions.CurrencyCode;

				//AppsFlyerTracker.SharedTracker.IsHTTPS = (initOptions.CommunicationsProtocol == CommunicationsProtocol.HTTPS) ;


			} catch (Exception ex) {
				SystemLogger.Log (SystemLogger.Module.PLATFORM, "AppsFlyer Initialize - exception catched: " + ex.Message, ex);
			}

		}