Beispiel #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            HideTitleBar();

            _fileName         = Intent.GetStringExtra("FileNameClicked") ?? RecordingContext.filename;
            _baseDirectory    = ConfigService.BaseDirectory;
            _metadataService  = new MetadataService();
            _audioFileService = new AudioFileService();
            _audioPlayService = new AudioPlayService(_baseDirectory, _fileName);
            _metadata         = _metadataService.GetRecordingMetadata(_baseDirectory, _fileName);

            AnalysisContext.UpdateContext(_baseDirectory, _fileName);
            SetContentView(Resource.Layout.AnalyseActivity);
            SetupButtons();

            if (_metadata.StartedAt != null && _metadata.StartedAt != default(DateTime))
            {
                FindViewById <TextView>(Resource.Id.title).Text = _metadata.StartedAt.ToString("f");
            }
            else
            {
                var fullAudioPath = _audioFileService.GetFullPathToRecording(_baseDirectory, _fileName);
                FindViewById <TextView>(Resource.Id.title).Text = fullAudioPath.Replace(_baseDirectory, "");
            }
            _playing = false;
            SetPlayButtonIcon();
        }
Beispiel #2
0
        public static void UpdateContext(string baseDirectory, string fileName)
        {
            _audioFileService = new AudioFileService();

            FullAudioPath = _audioFileService.GetFullPathToRecording(baseDirectory, fileName);
            BaseDirectory = baseDirectory;
            FileName      = fileName;
        }
Beispiel #3
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            _fullAudioPath    = AnalysisContext.FullAudioPath;
            _metadataService  = new MetadataService();
            _audioFileService = new AudioFileService();

            View view = inflater.Inflate(Resource.Layout.RecordingInfoFragment, container, false);

            view.FindViewById <TextView>(Resource.Id.content).Text = GetContent();

            return(view);
        }
Beispiel #4
0
        public FullTest()
        {
            InitializeComponent();
            if (!DesignMode && Program.SirenOfShameDevice != null)
            {
                Program.SirenOfShameDevice.Connected    += SirenOfShameDevice_Connected;
                Program.SirenOfShameDevice.Disconnected += SirenOfShameDevice_Disconnected;

                _audioFileService = new AudioFileService();
                _timer.Interval   = 1000;
                _timer.Enabled    = true;
            }
        }
Beispiel #5
0
 public AudioModule(AudioService audioService, AudioFileService fileService)
 {
     _audioService = audioService;
     _fileService  = fileService;
 }