cordova-plugin-file icon indicating copy to clipboard operation
cordova-plugin-file copied to clipboard

Cannot use copyTo() to write files to a USB

Open nevkatz opened this issue 5 years ago • 0 comments
trafficstars

Bug Report

Problem

I have written logic where my cordova app copies files and directories from the device to a USB drive, and vice-versa. Both operations work fine on for android devices running the Lollipop OS. That said, while I can copy files from the USB to the device in Pie, I cannot copy files from the USB to pie.

What is expected to happen?

The app is supposed to copy the file or directory successfully from the device to the USB.

What does actually happen?

When calling the copyTo() function I get error code 6, which I gather is a permissions error, and the file or directory is not copied.

Information

From what I can tell, this has to due with enhanced security restrictions introduced by the Pie OS. I was wondering if there was a version of this plugin that enabled you to successfully write to a USB drive, or if there was something I needed in my config.xml or another plugin that would be needed to write to a USB. Thank you for any input.

Command or Code

It is hard to reproduce unless you have the full app. You would need to use the copyTo() function to copy a file or directory from an existing directory path on the tablet to a directory path of a pluggined-in USB thumb drive.

Environment, Platform, Device

I am using a Cordova app on a Samsung Galaxy Tab running Android Pie.

Version information

I am using Cordova CLI tool version 9.0.0.

Checklist

  • [x] I searched for existing GitHub issues
  • [x] I updated all Cordova tooling to most recent version
  • [x] I included all the necessary information above

nevkatz avatar Feb 28 '20 01:02 nevkatz