Search in sources :

Example 1 with ViewModelAudioPlayer

use of org.odk.collect.android.widgets.utilities.ViewModelAudioPlayer in project collect by opendatakit.

the class FormEntryActivity method createODKView.

@NotNull
private ODKView createODKView(boolean advancingPage, FormEntryPrompt[] prompts, FormEntryCaption[] groups) {
    odkViewLifecycle.start();
    AudioClipViewModel.Factory factory = new AudioClipViewModel.Factory(MediaPlayer::new, scheduler);
    ViewModelAudioPlayer viewModelAudioPlayer = new ViewModelAudioPlayer(ViewModelProviders.of(this, factory).get(AudioClipViewModel.class), odkViewLifecycle);
    return new ODKView(this, prompts, groups, advancingPage, formSaveViewModel, waitingForDataRegistry, viewModelAudioPlayer, audioRecorder, formEntryViewModel, internalRecordingRequester, externalAppRecordingRequester);
}
Also used : ODKView(org.odk.collect.android.formentry.ODKView) AudioClipViewModel(org.odk.collect.audioclips.AudioClipViewModel) ViewModelAudioPlayer(org.odk.collect.android.widgets.utilities.ViewModelAudioPlayer) MediaPlayer(android.media.MediaPlayer) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

MediaPlayer (android.media.MediaPlayer)1 NotNull (org.jetbrains.annotations.NotNull)1 ODKView (org.odk.collect.android.formentry.ODKView)1 ViewModelAudioPlayer (org.odk.collect.android.widgets.utilities.ViewModelAudioPlayer)1 AudioClipViewModel (org.odk.collect.audioclips.AudioClipViewModel)1