I have an app that has a scripting capability - as well as saved scripts, it is possible for the app user to create new scripts in File.DirRootExternal which can then be run.
There are any number of in-phone apps that can edit the scripts but the limited realestate of a phone screen is severely inhibiting.
If the phone is hooked up to a PC via USB (in my case Samsung S5 to Windows 10) I can readily access the scripts from Windows Explorer - if I click on a file it comes up in Notepad.
Trouble starts when I try to Save the edited script directly back to the phone - there appears to be no mechanism for directly doing this.
I can save the script to somewhere on PC then use Windows Explorer to copy and paste it back to the phone - which is decidedly ugly.
I have spent a full day looking at all sorts of alternatives: FTP, SMB, ... you name it I have installed and googled my eyeballs till they are raw.
All these alternatives share at least one common flaw - they are not SIMPLE (it is ultimately going to be used by individuals of all levels of computing competence).
Is there any such animal?
If not, what is the fundamental problem?
Why can I copy and paste in Windows Explorer yet Notepad (and a succession of other Windows text editors) can't save to the phone?
On the Android device I download a free FTP server.
On the PC I use the free CoreFTP client.
From the PC client I can connect to the server on the device, navigate to a directory (I use DefaultExternal, but if RootExternal is Read/Write it should work), double-click a text file, edit and save.
I went down that rabbit hole and got it working - but it is not simple - to either explain or use - not to the sort of audience I am envisaging anyrate.
I also ran into that problem years ago.
I wrote a super-simple FTP server that could be embedded in an app.
Look for TinyFTP on these forums: https://www.b4x.com/android/forum/threads/tiny-ftp-server-as-class.27369/
A user could connect from the PC client and modify a specific file within the Apps directory structure.
Thanks again - I installed your B4A example wrapping of your TinyFTP and got it working but to be quite honest in my view it is a lot simpler to explain how to file locally on PC then cut and paste back to the phone.
What I do not understand is why you can achieve the desired end by cut and paste in Windows Explorer but not by simple Save or SaveAs in a Windows Text editor - it is positively bizarre.
I think the basic problem is that there is no connected filesystem between the two devices. Have you searched these forums for SMB? I seem to remember somebody working on this several years ago – I don't know anything about it. That might allow you to link the two filesystems.
Another option might be to write a B4J app for the PC that communicates directly with your Android app. This is extra work, but you could customize the GUI to suit your application.
Going thru that and trying to get the suggested AndSMB client working you are quickly in a maze of Windows network settings that I suspect most potential users of my app would shy away from, if not outright spew.
Another option might be to write a B4J app for the PC that communicates directly with your Android app. This is extra work, but you could customize the GUI to suit your application.
I am not adverse to writing something on the Windows end but I don't think it has much potential - you have to get access to the Android files thru the Windows file system and this is what seems to be the problem.