Beispiel #1
0
        void FeedbackTextViewClick(object sender, System.EventArgs e)
        {
            var intent = new Intent(Intent.ActionSendto);

            intent.SetData(Android.Net.Uri.FromParts("mailto", Constants.DeveloperEmail, null));
            StartActivity(intent);

            GoogleAnalyticsManager.ReportEvent(GACategory.AboutScreen, GAAction.Click, "send email");
        }
Beispiel #2
0
        protected override void OnActivityResult(int requestCode, Result resultCode, Android.Content.Intent data)
        {
            switch (requestCode)
            {
            case _pickSoundRequestId:
                if (resultCode == Result.Ok)
                {
                    var uri      = data.GetParcelableExtra(RingtoneManager.ExtraRingtonePickedUri);
                    var ringtone = RingtoneManager.GetRingtone(this, Android.Net.Uri.Parse(uri.ToString()));

                    _soundPref.Summary = ringtone.GetTitle(this);
                    PreferenceManager.GetDefaultSharedPreferences(this).Edit().PutString(SoundSettingKey, uri.ToString()).Commit();

                    GoogleAnalyticsManager.ReportEvent(GACategory.SettingsScreen, GAAction.Click, "new ringtone is set");
                }
                break;

            default:
                if (_billingManager != null)
                {
                    _billingManager.OnActivityResult(requestCode, resultCode, data);
                }

                base.OnActivityResult(requestCode, resultCode, data);
                break;
            }
        }
Beispiel #3
0
        void AlarmEnabledChange(object sender, CompoundButton.CheckedChangeEventArgs e)
        {
            GoogleAnalyticsManager.ReportEvent(GACategory.AlarmsScreen, GAAction.Click, "alarm " + (e.IsChecked ? "enabled" : "disabled"));

            EnableAlarm(_selectedAlarm, e.IsChecked);
            if (!e.IsChecked)
            {
                StopRinging();
            }
        }
Beispiel #4
0
        void OnMapLongClick(object sender, GoogleMap.MapLongClickEventArgs e)
        {
            var shouldAdd = PreferenceManager.GetDefaultSharedPreferences(this)
                            .GetBoolean(SettingsScreen.AddMarkerOnLongTap, SettingsScreen.AddMarkerOnLongTapDefaultValue);

            if (shouldAdd && Mode == Mode.None)
            {
                Mode = Mode.Add;
                MapClickWhileAddMode(e.Point);

                GoogleAnalyticsManager.ReportEvent(GACategory.MainScreen, GAAction.Click,
                                                   "map long click used to add alarm");
            }
        }
        void AlarmEnabledChange(object sender, CompoundButton.CheckedChangeEventArgs e)
        {
            if (_selectedAlarm == null || _selectedAlarm.Enabled == e.IsChecked)
            {
                return;
            }

            EnableAlarm(_selectedAlarm, e.IsChecked);
            Mode = Mode.MarkerSelected;
            if (!e.IsChecked)
            {
                StopRinging();
            }

            GoogleAnalyticsManager.ReportEvent(GACategory.MainScreen, GAAction.Click, "alarm " + (e.IsChecked ? "enabled" : "disabled"));
        }
Beispiel #6
0
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Resource.Id.delete:
                GoogleAnalyticsManager.ReportEvent(GACategory.AlarmsScreen, GAAction.Click, "alarm deleted");
                DeleteSelectedMarker();
                StopRinging();
                return(true);

            case Resource.Id.stop_noise:
                GoogleAnalyticsManager.ReportEvent(GACategory.AlarmsScreen, GAAction.Click, "sound muted");
                StopRinging();
                return(true);

            default:
                return(base.OnOptionsItemSelected(item));
            }
        }
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Android.Resource.Id.Home:
                if (Mode != Mode.None)
                {
                    OnBackPressed();
                }
                return(true);

            case Resource.Id.add_alarm:
                Mode = Mode.Add;
                return(true);

            case Resource.Id.accept:
                if (Mode == Mode.Add)
                {
                    if (AcceptAdd())
                    {
                        Mode = Mode.None;
                        GoogleAnalyticsManager.ReportEvent(GACategory.MainScreen, GAAction.Click, "alarm added");
                    }
                }
                return(true);

            case Resource.Id.delete:
                DeleteSelectedMarker();
                StopRinging();
                Mode = Mode.None;
                GoogleAnalyticsManager.ReportEvent(GACategory.MainScreen, GAAction.Click, "alarm deleted");
                return(true);

            case Resource.Id.action_settings:
                OpenSettings();
                return(true);

            default:
                return(base.OnOptionsItemSelected(item));
            }
        }