Esempio n. 1
0
        public async void Record(object arg)
        {
            await InitializeRecorder();

            if (App.SettingsHelper.RecordInBackground)
            {
                LocationHelper.StartTracking();
            }

            _recorder.Start();
            _isRecording = true;


            StatusText            = AppResources.RecordingStatusText;
            PauseResumeButtonText = AppResources.PauseButtonText;


            if (App.SettingsHelper.AddLocation)
            {
                IsLocationEnabled = true;

                LocationText = AppResources.LocationFindingText;
                _location    = await LocationHelper.GetLocationAsync();

                if (_location != null)
                {
                    LocationText = AppResources.AddressFindingText;
                    var address = await LocationHelper.GetAddressAsync(_location);

                    LocationText = !string.IsNullOrWhiteSpace(address) ? address : AppResources.AddressUnidentifiedText;
                }
                else
                {
                    LocationText = AppResources.LocationNotFoundText;
                }
            }
        }