public void ClickedPurchase()
    {
        string item  = itemField.text;
        string price = priceField.text;

        GrowthAnalytics.GetInstance().Purchase(int.Parse(price), null, item);
    }
    public void EndInputLevel()
    {
        string level = levelField.text;

        GrowthAnalytics.GetInstance().SetLevel(int.Parse(level));
    }
 public void ClickedRandom()
 {
     GrowthAnalytics.GetInstance().SetRandom();
 }
    public void ClickedDevelopment()
    {
        bool development = developmentToggle.isOn ? true : false;

        GrowthAnalytics.GetInstance().SetDevelopment(development);
    }
 public void Track(string _namespace, string name, Dictionary<string, string> properties, GrowthAnalytics.TrackOption option)
 {
     using (AndroidJavaObject hashMap = new AndroidJavaObject("java.util.HashMap"))
     {
         System.IntPtr method_Put = AndroidJNIHelper.GetMethodID (hashMap.GetRawClass (), "put",
                                                                  "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
         object[] args = new object[2];
         foreach (KeyValuePair<string, string> kvp in properties)
         {
             using (AndroidJavaObject k = new AndroidJavaObject("java.lang.String", kvp.Key))
             {
                 using (AndroidJavaObject v = new AndroidJavaObject("java.lang.String", kvp.Value))
                 {
                     args [0] = k;
                     args [1] = v;
                     AndroidJNI.CallObjectMethod (hashMap.GetRawObject (),
                                                  method_Put, AndroidJNIHelper.CreateJNIArgArray (args));
                 }
             }
         }
         AndroidJavaClass growthAnalyticsClass = new AndroidJavaClass( "com.growthbeat.analytics.GrowthAnalytics$TrackOption" );
         AndroidJavaObject optionObject = growthAnalyticsClass.GetStatic<AndroidJavaObject>(option == GrowthAnalytics.TrackOption.TrackOptionOnce ? "ONCE" : "COUNTER");
         growthAnalytics.Call("track", _namespace, name, hashMap, optionObject, null);
     }
 }
 public void SetGender(GrowthAnalytics.Gender gender)
 {
     AndroidJavaClass growthAnalyticsClass = new AndroidJavaClass( "com.growthbeat.analytics.GrowthAnalytics$Gender" );
     AndroidJavaObject genderObject = growthAnalyticsClass.GetStatic<AndroidJavaObject>(gender == GrowthAnalytics.Gender.GenderMale ? "MALE" : "FEMALE");
     growthAnalytics.Call("setGender",genderObject);
 }
 public void SetGender(GrowthAnalytics.Gender gender)
 {
     ga_setGender((int)gender);
 }
 public void Track(string name, GrowthAnalytics.TrackOption option)
 {
     Track (name, new Dictionary<string, string>(), option);
 }
 public void Track(string _namespace, string name, Dictionary<string, string> properties, GrowthAnalytics.TrackOption option)
 {
     ga_trackWithNamespace(_namespace, name, GetLine(properties), (int)option);
 }
 public void Track(string _namespace, string name, Dictionary<string, string> properties, GrowthAnalytics.TrackOption option)
 {
     this.growthAnalyticsInterface.Track (_namespace, name, properties, option);
 }
 public void Track(string name, GrowthAnalytics.TrackOption option)
 {
     this.growthAnalyticsInterface.Track (name, new Dictionary<string, string>(), option);
 }
 public void SetGender(GrowthAnalytics.Gender gender)
 {
     this.growthAnalyticsInterface.SetGender(gender);
 }
예제 #13
0
 void Awake()
 {
     GrowthAnalytics.GetInstance().Initialize("APPLICATION_ID", "CREDENTIAL_ID");
 }