public void SendEventWithBundle(String eventID, String key, String value)
    {
        Bundle bundleUnity = new Bundle();

        bundleUnity.PutString(key, value);
        Debug.Log($"[HMS] : Analytics Kits Event Id:{eventID} Key:{key} Value:{value}");
        hiAnalyticsInstance.OnEvent(eventID, bundleUnity);
    }
Beispiel #2
0
        /// <summary>
        /// Sent event for AppsFlyer.
        /// </summary>
        private void CreateAppsFlyerTag()
        {
            string eventName = "AppFlyers";

            Bundle bundle = new Bundle();

            bundle.PutString("appsflyer", "testappsflyer");

            //report
            if (instance != null)
            {
                instance.OnEvent(eventName, bundle);
                Log.Debug("AppsFlyerTag", "Sent event for AppsFlyer. Please check AppsFlyer dashboard. Event name:" + eventName);
                Toast.MakeText(this, "Sent event for AppsFlyer. Please check AppsFlyer dashboard. Event name:" + eventName, ToastLength.Short).Show();
            }
        }
        private void SendEvent(string key, string value)
        {
            // Initiate Parameters
            Bundle bundle = new Bundle();

            bundle.PutString(key, value);
            // Report a custom Event
            _hiAnalyticsInstance?.OnEvent(key, bundle);
        }
Beispiel #4
0
        private void SubmitButton_Click(object sender, EventArgs e)
        {
            // TODO: Report score by using SUBMITSCORE Event
            // Initiate Parameters
            Bundle bundle = new Bundle();

            bundle.PutLong(HAParamType.Score, QuizData.Result);

            // Report a preddefined Event
            instance.OnEvent(HAEventType.Submitscore, bundle);

            DisplayAlert("Your score reported successfully");
        }
        private void CreateOrderBtn_Click(object sender, EventArgs e)
        {
            bool   isPassed = false;
            double price;

            if (ValidationInputs(productId.Text.Trim(), productName.Text.Trim(), productFeature.Text.Trim(), productPrice.Text.Trim()))
            {
                isPassed = double.TryParse(productPrice.Text.Trim(), out price);
                if (isPassed)
                {
                    Bundle bundle = new Bundle();
                    //Initiate Parameters
                    bundle.PutString(HAParamType.Productid, productId.Text.Trim());
                    bundle.PutString(HAParamType.Productname, productName.Text.Trim());
                    bundle.PutString(HAParamType.Productfeature, productFeature.Text.Trim());

                    bundle.PutDouble(HAParamType.Price, price);

                    //Report a preddefined Event
                    instance.OnEvent(HAEventType.Completeorder, bundle);

                    Bundle orderBundle = new Bundle();
                    orderBundle.PutString(HAParamType.Orderid, CreateRandomId());
                    instance.OnEvent(HAEventType.Completeorder, orderBundle);

                    Toast.MakeText(Activity, "Order was created. OrderId: " + orderBundle.GetString(HAParamType.Orderid), ToastLength.Short).Show();
                }
                else
                {
                    Toast.MakeText(Activity, "Please enter valid price.", ToastLength.Short).Show();
                }
            }
            else
            {
                Toast.MakeText(Activity, "Please fill all inputs.", ToastLength.Short).Show();
            }
        }
Beispiel #6
0
 public void LogEvent(string action)
 {
     m_analytics.OnEvent(action, new Bundle());
 }