Exemple #1
0
    public void OnSaveToProfilePressed(GameObject go)
    {
        if (!ITTDataCache.Instance.HasNetworkConnection)
        {
            ModalPopupOK.Spawn("Experiencing connection issues with the server. Please check your connection and try again.");
            return;
        }

        if (false == _hasBeenOrCurrentlyRotated)
        {
            StartCoroutine(RotateEffect());
            ITTGoogleAnalytics.Instance.googleAnalytics.LogEvent(new EventHitBuilder()
                                                                 .SetEventCategory("Detail - Detail Card")
                                                                 .SetEventAction("Click - Save to Profile Button")
                                                                 .SetEventLabel("User has clicked on the Save to Profile button for Nid: " + Nid.ToString()));
            ITTDataCache.Instance.FlagSaved(Nid, null, null);
        }
    }
Exemple #2
0
 public void OnWebsiteButtonPressed(GameObject go)
 {
     if (!Website.ToLower().Contains("http://"))
     {
         Website = "http://" + Website;
     }
     ITTGoogleAnalytics.Instance.googleAnalytics.LogEvent(new EventHitBuilder()
                                                          .SetEventCategory("Detail - Detail Card")
                                                          .SetEventAction("Click - Website Button")
                                                          .SetEventLabel("User has clicked on the website button for Nid: " + Nid.ToString() + "url: " + Website));
     Application.OpenURL(Website);
 }
Exemple #3
0
 public void OnPhoneButtonPressed(GameObject obj)
 {
     ITTGoogleAnalytics.Instance.googleAnalytics.LogEvent(new EventHitBuilder()
                                                          .SetEventCategory("Detail - Detail Card")
                                                          .SetEventAction("Click - Phone Button")
                                                          .SetEventLabel("User has clicked on the phone button for Nid: " + Nid.ToString()));
     HelperMethods.Instance.FormatAndCallNumber(phoneNumberTextLabel.text);
 }
Exemple #4
0
    public void OnMapButtonPressed(GameObject obj)
    {
        ITTGoogleAnalytics.Instance.googleAnalytics.LogEvent(new EventHitBuilder()
                                                             .SetEventCategory("Detail - Detail Card")
                                                             .SetEventAction("Click - Map Button")
                                                             .SetEventLabel("User has clicked on the map button for Nid: " + Nid.ToString()));
        string addressLocation = ("N/A" == locationAddressTextLabel.text) ? latitude + ", " + longitude : locationAddressTextLabel.text;

        HelperMethods.Instance.OpenMap(addressLocation);
    }
Exemple #5
0
 public void OnRecommendPressed(GameObject go)
 {
     ITTGoogleAnalytics.Instance.googleAnalytics.LogEvent(new EventHitBuilder()
                                                          .SetEventCategory("Detail - Detail Card")
                                                          .SetEventAction("Click - Recommend Button")
                                                          .SetEventLabel("User has clicked on the recommended button for Nid: " + Nid.ToString()));
     ITTDataCache.Instance.IsFlaggedRecommended(Nid, OnFlagStatusReturned, null);
     UIEventListener.Get(recommendButton.gameObject).onClick -= OnRecommendPressed;
 }
Exemple #6
0
    private void OnSharePressed(GameObject go)
    {
        ITTGoogleAnalytics.Instance.googleAnalytics.LogEvent(new EventHitBuilder()
                                                             .SetEventCategory("Facebook - Detail Card")
                                                             .SetEventAction("Click - Facebook Share Button")
                                                             .SetEventLabel("User is trying to share activity Nid: " + ((Nid > 0) ? Nid.ToString() : "")));
        if (!FacebookWrapper.IsInitialized)
        {
            return;
        }

        if (!FacebookWrapper.IsLoggedIn)
        {
            ITTGoogleAnalytics.Instance.googleAnalytics.LogEvent(new EventHitBuilder()
                                                                 .SetEventCategory("Facebook - Facebook Login Flow")
                                                                 .SetEventAction("Login - Facebook Login Flow")
                                                                 .SetEventLabel("Prompting user to log into Facebook"));
            StartCoroutine(LogIntoFacebookAndShare());
        }
        else
        {
            ShareToFacebook();
        }
    }