1

We have an interesting use case for directory mirroring / syncing, but I'm guessing it's not completely unique:

We want to use a barcode scanning app on an android device, and have the scanned results show up 'instantly' on a windows computer on the same wifi network. All of this is LAN-only, i.e. no internet.

In addition, the wifi and/or the windows network will not always be alive when the barcode scanning happens, so, the android would need to detect when the network (and shared drive, sync server program, etc) comes alive and start syncing / mirroring at that time, without complaining before that time.

The barcode scanning app I'm using is xscanpet (though, open to other suggestions). It saves new scans, with timestamp and lookup features, to a spreadsheet file after every scan. However, the user cannot specify the save directory - it's apparently hardcoded to /scanpet (on the android device's root dir).

What would be a workable solution to get that file viewable by the Windows network 'instantly' with as little user intervention and as possible?

The solution would also need to be easily trainable and usable by a wide audience, with little or no requirement for tech-savvy.

Conceptually, are there different options depending on whether you want to "write to a shared drive from the android" versus "read from the android using windows"?

Options I've looked in to so far - along with some conclusions, but, please do point out if any of these conclusions are incorrect:

  • SMB / shared windows drive: If I could 'mirror from /scanpet to SMB, once the SMB drive is available' then everything would be good... PROs: simple; ES File Explorer and other apps can connect to SMB CONs: scanpet cannot write to anything but /scanpet

  • ftp server on the android (from ES File Explorer), viewable from any other machine on the network using ftp client / web browser: PROs: instantly available CONs: making a shortcut on the windows system to the ftp location (ftp://:/scanpet) is not really useful - windows considers the shortcut to be a plain file, so, it cannot be directly scanned for changes; I looked some at code to get the link target, but it's not clear if that would get the job done; i.e. there wouldn't be any shared-drive benefits to this option; the monitoring program would have to look directly at the ftp directory

  • other sync apps such as FolderSync or Folder Sync: PROs: seems to be a full solution for scheduled syncing CONs: these apps don't seem to provide for actual mirroring / syncing on file change

  • Tasker app: I haven't really explored whether there's a solution here? Maybe integration with FolderSync?

  • You've already listed the ingredients. Now you need to mix the meal: Tasker can detect file changes, FolderSync Pro can be controled via Tasker – so: Context=FileChanged, Task=Sync :) I do something similar here: Power connected, Network available, night-time → sync :) – Izzy Jun 17 '16 at 19:41
  • One tricky part is that you don't know the filename ahead of time - just the dir name. I don't see a way to make tasker watch a dir for changes...? – Tom Grundy Jun 17 '16 at 23:04
  • Actually I do see now that you can watch a whole dir by long pressing the dir when you select from 'file modified'. Thanks I will keep pursuing this option! – Tom Grundy Jun 17 '16 at 23:18
  • I've never played with that myself (which is why I just posted this as comment). Maybe there's a Tasker plugin dealing with this more properly. Be welcome to check with my Tasker resource collection. – Izzy Jun 18 '16 at 11:38
  • In this use case it would be nice to just use smb (cifs). I can copy to the smb from es file explorer but without rooting I can't mount it to allow the simply copy dir task in tasker. I guess I need to find the right intent syntax to tell es file explorer to copy to smb? – Tom Grundy Jun 18 '16 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.