You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var onSuccess = function (e) {
console.log('onSuccess', e);
};
var onError = function (e) {
console.log('onError', e);
};
my_media = new Media(cordova.file.externalDataDirectory + 'audio.mp3', onSuccess, onError);
my_media.startRecord();
However startRecord gives an error {code: 1} in Android 10.
What have I tried with same result:
my_media = new Media(cordova.file.cacheDirectory + 'audio.mp3', onSuccess, onError);
my_media.startRecord();
my_media = new Media(cordova.file.applicationStorageDirectory + 'audio.mp3', onSuccess, onError);
my_media.startRecord();
my_media = new Media(cordova.file.dataDirectory + 'audio.mp3', onSuccess, onError);
my_media.startRecord();
I also tried to create file before recording:
resolveLocalFileSystemURL(cordova.file.externalDataDirectory , function (entry) {
entry.getFile('audio.mp3', {
create: true,
exclusive: false
}, function (fileEntry) {
console.log('getFile', fileEntry);
my_media = new Media(cordova.file.externalDataDirectory + 'audio.mp3', onSuccess, onError);
my_media.startRecord();
}, function (err) {
console.log(err);
});
}, function (err) {
console.log(err);
});
The file is created but recording does not start.
Please tell if I am doing something wrong or if this plugin is not working with Android 10+ so I will not waste my days trying to make it work.
P.S. similar issues suggests requestLegacyExternalStorage flag but it is not solving problem anymore because Play Market now requires apps to use API level 30.
The text was updated successfully, but these errors were encountered:
The following code works in Android 8:
However startRecord gives an error {code: 1} in Android 10.
What have I tried with same result:
I also tried to create file before recording:
The file is created but recording does not start.
Please tell if I am doing something wrong or if this plugin is not working with Android 10+ so I will not waste my days trying to make it work.
P.S. similar issues suggests requestLegacyExternalStorage flag but it is not solving problem anymore because Play Market now requires apps to use API level 30.
The text was updated successfully, but these errors were encountered: