MOBILE-3833 audio: Allow capture audio in app in Android 10+

This was disabled before because there was a bug in the Cordova plugin, but it seems to be fixed now
main
Dani Palou 2022-04-07 12:51:49 +02:00
parent 7a718a727c
commit 4aeababbf6
1 changed files with 1 additions and 3 deletions

View File

@ -550,10 +550,8 @@ export class CoreFileUploaderHelperProvider {
media = medias[0]; // We used limit 1, we only want 1 media.
} catch (error) {
if (isAudio && this.isNoAppError(error) && CoreApp.isMobile() &&
(!Platform.is('android') || CoreApp.getPlatformMajorVersion() < 10)) {
if (isAudio && this.isNoAppError(error) && CoreApp.isMobile()) {
// No app to record audio, fallback to capture it ourselves.
// In Android it will only be done in Android 9 or lower because there's a bug in the plugin.
try {
media = await CoreFileUploader.captureAudioInApp();
} catch (error) {