use of org.odk.collect.audioclips.PlaybackFailedException in project collect by opendatakit.
the class ODKView method setupAudioErrors.
private void setupAudioErrors() {
audioHelper.getError().observe(viewLifecycle, e -> {
if (e instanceof PlaybackFailedException) {
final PlaybackFailedException playbackFailedException = (PlaybackFailedException) e;
Toast.makeText(getContext(), getContext().getString(playbackFailedException.getExceptionMsg() == 0 ? R.string.file_missing : R.string.file_invalid, playbackFailedException.getURI()), Toast.LENGTH_SHORT).show();
audioHelper.errorDisplayed();
}
});
}
Aggregations