コード例 #1
0
        /// <summary>
        /// Set your user's age in years.
        /// </summary>
        /// <param name="age">Reported age of user.</param>
        public void LogUserAge(int age)
        {
#if UNITY_EDITOR
#elif UNITY_IOS
            FlurryIOS.SetAge(age);
#elif UNITY_ANDROID
            FlurryAndroid.SetAge(age);
#endif
        }
コード例 #2
0
        /// <summary>
        /// Set your user's gender.
        /// </summary>
        /// <param name="gender">
        /// Reported gender of user. Allowable values are 'm' or 'c' 'f'
        /// </param>
        public void LogUserGender(UserGender gender)
        {
#if UNITY_EDITOR
#elif UNITY_IOS
            FlurryIOS.SetGender(gender == UserGender.Male ? "m" : gender == UserGender.Female ? "f" : "c");
#elif UNITY_ANDROID
            FlurryAndroid.SetGender((byte)(gender == UserGender.Male ? 1 : gender == UserGender.Female ? 0 : -1));
#endif
        }
コード例 #3
0
        /// <summary>
        /// Records an app exception. Commonly used to catch unhandled exceptions.
        /// </summary>
        /// <param name="errorID">Name of the error.</param>
        /// <param name="message">The message to associate with the error.</param>
        /// <param name="exception">The exception object to report.</param>
        public void LogError(string errorID, string message, object target)
        {
#if UNITY_EDITOR
#elif UNITY_IOS
            FlurryIOS.LogError(errorID, message, null);
#elif UNITY_ANDROID
            FlurryAndroid.OnError(errorID, message, target.GetType().Name);
#endif
        }
コード例 #4
0
        /// <summary>
        /// Assign a unique id for a user in your app.
        /// </summary>
        /// <param name="userID">The app id for a user.</param>
        public void LogUserID(string userID)
        {
#if UNITY_EDITOR
#elif UNITY_IOS
            FlurryIOS.SetUserId(userID);
#elif UNITY_ANDROID
            FlurryAndroid.SetUserId(userID);
#endif
        }
コード例 #5
0
        /// <summary>
        /// Ends a timed event specified by eventName and optionally updates parameters with
        /// parameters.
        /// </summary>
        /// <param name="eventName">
        /// Name of the event. For maximum effectiveness, we recommend using a naming scheme
        /// that can be easily understood by non-technical people in your business domain.
        /// </param>
        /// <param name="parameters">
        /// An immutable copy of map containing Name-Value pairs of parameters.
        /// </param>
        public void EndLogEvent(string eventName, Dictionary <string, string> parameters)
        {
#if UNITY_EDITOR
#elif UNITY_IOS
            FlurryIOS.EndTimedEvent(eventName, parameters);
#elif UNITY_ANDROID
            FlurryAndroid.EndTimedEvent(eventName, parameters);
#endif
        }
コード例 #6
0
        /// <summary>
        /// Generates debug logs to console.
        /// </summary>
        /// <param name="level">Log level.</param>
        public void SetLogLevel(LogLevel level)
        {
#if UNITY_EDITOR
#elif UNITY_IOS
            FlurryIOS.SetLogLevel(level);
#elif UNITY_ANDROID
            FlurryAndroid.SetLogLevel(level);
#endif
        }
コード例 #7
0
        /// <summary>
        /// Explicitly specifies the App Version that Flurry will use to group Analytics data.
        /// </summary>
        /// <param name="version">The custom version name.</param>
        public void LogAppVersion(string version)
        {
#if UNITY_EDITOR
#elif UNITY_IOS
            FlurryIOS.SetAppVersion(version);
#elif UNITY_ANDROID
            FlurryAndroid.SetVersionName(version);
#endif
        }
コード例 #8
0
        /// <summary>
        /// Start or continue a Flurry session for the project denoted by apiKey.
        /// </summary>
        /// <param name="apiKey">The API key for this project.</param>
        public void StartSession(string apiKey)
        {
#if UNITY_EDITOR
#elif UNITY_IOS
            FlurryIOS.StartSession(apiKey);
#elif UNITY_ANDROID
            FlurryAndroid.Init(apiKey);
            FlurryAndroid.OnStartSession();
#endif
        }
コード例 #9
0
        /// <summary>
        /// Records a custom parameterized timed event specified by eventName with parameters.
        /// </summary>
        /// <param name="eventName">
        /// Name of the event. For maximum effectiveness, we recommend using a naming scheme
        /// that can be easily understood by non-technical people in your business domain.
        /// </param>
        /// <param name="parameters">
        /// An immutable copy of map containing Name-Value pairs of parameters.
        /// </param>
        public EventRecordStatus BeginLogEvent(string eventName, Dictionary <string, string> parameters)
        {
#if UNITY_EDITOR
            return(EventRecordStatus.Failed);
#elif UNITY_IOS
            return(FlurryIOS.LogEvent(eventName, parameters, true));
#elif UNITY_ANDROID
            return(FlurryAndroid.LogEvent(eventName, parameters, true));
#endif
            return(EventRecordStatus.Failed);
        }
コード例 #10
0
        /// <summary>
        /// Records a timed event specified by eventName.
        /// </summary>
        /// <param name="eventName">
        /// Name of the event. For maximum effectiveness, we recommend using a naming scheme
        /// that can be easily understood by non-technical people in your business domain.
        /// </param>
        public EventRecordStatus BeginLogEvent(string eventName)
        {
#if UNITY_EDITOR
            return(EventRecordStatus.Failed);
#elif UNITY_IOS
            return(FlurryIOS.LogEvent(eventName, true));
#elif UNITY_ANDROID
            return(FlurryAndroid.LogEvent(eventName, true));
#endif
            return(EventRecordStatus.Failed);
        }