Test Run
-
VirtuesArios
- Posts: 37
- Joined: June 2nd, 2022, 5:55 am
Test Run
Is there a way we could run a program using an Android if the program is running and data sync in the DropBox is all good, then we want a clean (Database/CSDB) before the survey start.
-
Gregory Martin
- Posts: 1961
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Test Run
The easiest way to do this, as long as you don't mind the training data staying on the tablet (but inaccessible), is to use different data files for the training data and the main survey data. For example, collect data to Training-Data.csdb, and then when testing is done:
1) Modify your PFF, changing the filename to Data.csdb.
3) Update your applications so that they have this new PFF, either manually or via CSDeploy.
3) Delete the directory on Dropbox containing the synced training data.
1) Modify your PFF, changing the filename to Data.csdb.
3) Update your applications so that they have this new PFF, either manually or via CSDeploy.
3) Delete the directory on Dropbox containing the synced training data.
-
VirtuesArios
- Posts: 37
- Joined: June 2nd, 2022, 5:55 am
Re: Test Run
If there is only, is it possible to erase also the data on the tablet? Thank for the reply Gregory Martin much appreciate it.Gregory Martin wrote: July 16th, 2026, 10:51 am The easiest way to do this, as long as you don't mind the training data staying on the tablet (but inaccessible), is to use different data files for the training data and the main survey data. For example, collect data to Training-Data.csdb, and then when testing is done:
1) Modify your PFF, changing the filename to Data.csdb.
3) Update your applications so that they have this new PFF, either manually or via CSDeploy.
3) Delete the directory on Dropbox containing the synced training data.
-
Gregory Martin
- Posts: 1961
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Test Run
One option is to simply add logic in the preproc of your application that deletes the old data file. Something like this:
As the deleted file cannot be recovered, be careful if you use this code!
filedelete("Training-Data.csdb");
The function will return 0 is the file doesn't exist, but it won't display an error message to the user, so you can run this code repeatedly without an issue.As the deleted file cannot be recovered, be careful if you use this code!