Hello,
I have the following problem : when I connect my android device to my computer (windows 7 pro), the storage is not mounted as an USB device with a letter. So I'm not able to use a batch to copy file to and from android.
I need to do that to transfer data of csentry in a simple manner.
I have a SDCARD seen as an usb device with a letter.
I tried to specify the storage place for the sdcard directly in the .pff file. But it does not work.
Any suggestion?
Many Thanks for your advices
Jean-Marie Chrétien
University Hospital - Angers - France
How to specify that data must be stored on a sdcard
-
- Posts: 2
- Joined: September 6th, 2016, 4:05 am
Re: How to specify that data must be stored on a sdcard
Most modern Android devices don't mount as USB when connected to Windows computers. Most use Media Transfer Protocol instead which doesn't create a drive letter and doesn't support any easy way to copy files from a batch file. If you know Windows programming it is possible to write code in VB or C# to copy files from an Android device using MTP (see for example https://cgeers.wordpress.com/2011/08/13 ... g-content/).
There are some security restrictions imposed by Android and what files apps can read and write on removable SD cards. When CSEntry is run for the first time it requests Android create a directory on the removeable SD card that CSEntry will have permission to read and write. On the phone/tablet itself this directory is usually /storage/extSdCard/Android/data/gov.census.cspro.csentry/files although that may vary from device to device. You can get the path for your device by calling pathname(CSEntryExternal) in a CSPro application and displaying the result. Something like:
errmsg("SDCARD PATH=%s", pathname(CSEntryExternal));
You should be able to use the path returned by that function in your pff file.
There are some security restrictions imposed by Android and what files apps can read and write on removable SD cards. When CSEntry is run for the first time it requests Android create a directory on the removeable SD card that CSEntry will have permission to read and write. On the phone/tablet itself this directory is usually /storage/extSdCard/Android/data/gov.census.cspro.csentry/files although that may vary from device to device. You can get the path for your device by calling pathname(CSEntryExternal) in a CSPro application and displaying the result. Something like:
errmsg("SDCARD PATH=%s", pathname(CSEntryExternal));
You should be able to use the path returned by that function in your pff file.
-
- Posts: 2
- Joined: September 6th, 2016, 4:05 am
Re: How to specify that data must be stored on a sdcard
Hello,
Thank you very much for your response.
I have examined several solutions : development of a tools (with the reference you have mentionned), write data on an external SDCard, use of an analog of cecopy (usable with Windows mobile devices), use of a WedDAV server on the Tablet, use of a synchronization tool capable of working with MTP devices.
My finding:
- errmsg("SDCARD PATH=%s", pathname(CSEntryExternal)); return "SCDARD PATH=<invalid path>", so write on an external SDCard is not possible on my device.
- the development of a specific tool is not my number one priority
- a WebDAV server implies an active internet connexion on the tablet. It's not our case.
- I did not find an analog of cecopy for android devices
- Finally, I have found a solution using FreeFileSync which is a very pretty synchronization tool.
With ffsync, I configured a profile to be able to synchronize data in one click with a shortcut installed on the desktop.
Thank you very much for your help and I hope the solution found will help other users.
Thank you very much for your response.
I have examined several solutions : development of a tools (with the reference you have mentionned), write data on an external SDCard, use of an analog of cecopy (usable with Windows mobile devices), use of a WedDAV server on the Tablet, use of a synchronization tool capable of working with MTP devices.
My finding:
- errmsg("SDCARD PATH=%s", pathname(CSEntryExternal)); return "SCDARD PATH=<invalid path>", so write on an external SDCard is not possible on my device.
- the development of a specific tool is not my number one priority
- a WebDAV server implies an active internet connexion on the tablet. It's not our case.
- I did not find an analog of cecopy for android devices
- Finally, I have found a solution using FreeFileSync which is a very pretty synchronization tool.
With ffsync, I configured a profile to be able to synchronize data in one click with a shortcut installed on the desktop.
Thank you very much for your help and I hope the solution found will help other users.