Example #1
0
        void TrackGetWeatherEvent()
        {
            var eventDictionaryHockeyApp = new Dictionary <string, string>
            {
                { "Use GPS Enabled", UseGPS.ToString() }
            };

            try
            {
                if (!Temp.Contains(_errorMessage))
                {
                    var locationCityName = UseGPS
                                                ? Condition?.Substring(0, Condition.IndexOf(":", StringComparison.Ordinal))
                                                                        : Location;

                    eventDictionaryHockeyApp.Add("Location", locationCityName);
                }
            }
            catch (Exception ex)
            {
                HockeyappHelpers.Report(ex);
            }
            finally
            {
                HockeyappHelpers.TrackEvent("Weather Button Tapped", eventDictionaryHockeyApp, null);
            }
        }
Example #2
0
 protected override void OnAppearing()
 {
     base.OnAppearing();
     HockeyappHelpers.TrackEvent(HockeyappConstants.WeatherPageAppeared);
 }
Example #3
0
 private void ExecuteFeedbackButtonCommand()
 {
     HockeyappHelpers.TrackEvent("Feedback Button Tapped");
     DependencyService.Get <IHockeyAppFeedbackService>()?.GiveFeedback();
 }
Example #4
0
        //private async Task ExecuteChangeLocationCommand()
        //{
        //	var yesNo = await DisplayAlert("Update Location", "Are you sure you want to change your location?", "Yes", "No");

        //	if (yesNo)
        //	{
        //		if (DefaultLocation.Text != _currentuser.defaultLocation)
        //		{
        //			_currentuser.defaultLocation = DefaultLocation.Text;

        //			var success = await AzureService.Instance.SaveUserAsync(_currentuser);
        //			if (!success)
        //			{
        //				await DisplayAlert("Error!", "Error changing your location", "OK");
        //			}
        //			else {
        //				await DisplayAlert("Success!", $"You have changed your default location to {DefaultLocation.Text}", "OK");
        //				Settings.Current.City = DefaultLocation.Text;
        //			}
        //		}
        //		else {
        //			await DisplayAlert("Same Location", "You didn't change the location!", "OK");
        //		}
        //	}
        //}

        private void ExecuteCrashButtonCommand()
        {
            HockeyappHelpers.TrackEvent("Crash Button Tapped");
            throw new Exception("Crash Button Tapped");
        }
Example #5
0
 protected override void OnAppearing()
 {
     base.OnAppearing();
     HockeyappHelpers.TrackEvent("Weather Page Appeared");
 }
Example #6
0
 private void ExecuteCrashButtonCommand()
 {
     HockeyappHelpers.TrackEvent(HockeyappConstants.CrashButtonTapped);
     throw new Exception(HockeyappConstants.CrashButtonTapped);
 }