Android Question Simple means of editing Android files from PC needed

JackKirk

Well-Known Member
Licensed User
Longtime User
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?

Thanks as always for any help...
 

canalrun

Well-Known Member
Licensed User
Longtime User
Hello,
I do that to edit text parameter files.

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.

Barry.
 
Upvote 0

JackKirk

Well-Known Member
Licensed User
Longtime User
Barry,

Thanks for your quick response.

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.

Thanks again...

Anyone got anything simple?
 
Upvote 0

JackKirk

Well-Known Member
Licensed User
Longtime User
Barry,

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.

Regards...
 
Upvote 0

canalrun

Well-Known Member
Licensed User
Longtime User
I agree, it's not a perfect solution.

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.

Barry.
 
Upvote 0

JackKirk

Well-Known Member
Licensed User
Longtime User
Barry,

I stumbled across SMB in my initial stumbling around and have just had another look in these forums, there's a tutorial at:

https://www.b4x.com/android/forum/threads/android-smb-cifs-tutorial.17179/

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.

Maybe we can get Erel to weigh in on this...
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…