Open shiv19 opened 2 years ago
@shiv19 that seem native related. Did you try on real device?
@farfromrefug yes, these screenshots are from a real device. It was connected to my laptop via USB debugging mode.
The target SDK is 30.
I'm also having the same problem, does anyone have a solution?
Same here. Seems that the error is not only related to recent section, because it had occasions which I was able to navigate to a folder and back to recent section and I was able to pick file. In other times it return null from Download section.
@dfborba @ShimonKh sorry i dont have much time to look at this right now. The best thing would be to make a quick search on the web to see if it happens with native. We could find a solution on stackoverflow.
@farfromrefug Don't worry, I definitely understand :). The solutions I've found didn't work for my case, but I'll keep searching!
If you have any EAT in the further future, please tell us, it would be great to have all in one place instead of a lot of logic outside the plugin.
Same for me, any solution or workaround?
I have the same error when select a PDF or doc file with Android 11 SDK 30.
And in my case when attempt to read file get error: Error: ReadTask returns no result.
const file = fileSystemModule.File.fromPath(results[0]);
console.log('file', file);
const name = file._name;
console.log('name', name);
let filebase64 = '';
file.read().then((value) => {
console.log('value', value);
if (isAndroid) filebase64 = android.util.Base64.encodeToString(value, android.util.Base64.NO_WRAP);
else filebase64 = value.base64EncodedStringWithOptions(0);
accept([
{
file: filebase64,
name: name,
},
]);
}).catch(function (e) {
// process error
console.log('file.read error');
console.log(e);
reject('Algo ha fallado al subir la imagen desde la galería, inténtelo de nuevo.');
});
If i change to targetSdkVersion 29 works fine but to publish now to google app store need 30
However, if I open the menu and go into the internal storage, downloads and then select the file, I get the correct path