I think I found the answer to via stack overflow
To be clear right now this plugin does pretty much everything. You use the raw File api on Java to write and read anywhere you want unfortunately there are certain places the app cannot read or write with out rooting the android phone. To be clear I am not an android expert, I use an iPhone 7 as my main phone and I am not to familiar with the limitation of android. I have been trying to write files to sd card for a while with java but android does not like it. I am still looking into writing in app folder on sd card but it may not be the solution you are looking for. I wish there was something I could due but I am limited the walls of phone os. I did all my testing on a KitKat device. I will try to find a solution on my 5.1 device but I am not hopeful. If anyone has any solution feel free to share.
To reiterate when I made this plugin I was making it to access all data inside Environment.getExternalStorageDirectory() but android considers this to be the phones internal memory which is odd to me.
Great job dear. I know it is not as easy as appear.
That's ought to be the reason. I have been reading about android limitation to certain folders.
Really, for me will be enough to write to the app's folder at the sd. I mean, you mentioned the following: "I am still looking into writing in app folder on sd card but it may not be the solution you are looking for"...
This solution can be fine dear. I only need to write to a folder where the user later can take the files and the app can read the files. The idea is that SD can works as a backup, so, if the user change the phone, he has the backup file in the app folder at the sd card.
I have tried with the proper name of the app to create the folder but I can't do it.
Have you tested creating a folder for the app (package name) at sd and works? Can you share the code to do it through your plugging?
For example, the app with package name com.example.foo can now freely access Android/data/com.example.foo/ on external storage devices with no permissions
Any chance to obtain the route to create the app data folder ? in the above example "Android/data/com.example.foo/ ?
Will works Context.getExternalFilesDirs()
Can pass this variable through your plugging ?
I know it is terrible different from one android version to other, according to the docs you sent dear.
Any chance will be very very appreciate dear.
All in all thanks so much for your excellent plugging. Great job dear.