Synchronization using dropbox

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
AriSilva
Posts: 165
Joined: July 22nd, 2016, 3:55 pm

Synchronization using dropbox

Postby AriSilva » March 15th, 2018, 8:38 am

Hi folks,
1. I selected dropbox in the options/synchronization.
2, Generated the pen.
3. Copied pen and pff file to the mobile (Samsung tablet using android 4.1).
4. Started the application.
5. The sync symbol is not shown in the application header.
6. Trying to use the sync from the csentry menu it asked for the pnc file which I assume I do not need.
Best
Ari
Best
Ari

AriSilva
Posts: 165
Joined: July 22nd, 2016, 3:55 pm

Re: Synchronization using dropbox

Postby AriSilva » March 15th, 2018, 10:10 am

By looking at the example in SimpleCapi (which works using Dropbox), and comparing with mine, the difference is in the pff options:

(mine)
[DataEntryInit]
StartMode=Add
Lock=CaseListing
Interactive=Ask

(simplecapi)
[DataEntryInit]
Interactive=Ask

The problem is that my application is a menu application that has no cases, it is just to select some alternatives for the user to choose from.
In this case, there is no sense in starting asking for "Enter a new case" just to go to the user´s menu.
And the sync icon does not appear when the menu is shown, of course (that was my mistake).
Besides that, I do not know a way to stop entering data and return to the program main screen where it asks for a new case, and where the icon is shown.
Best
Ari
Best
Ari

AriSilva
Posts: 165
Joined: July 22nd, 2016, 3:55 pm

Re: Synchronization using dropbox

Postby AriSilva » March 15th, 2018, 10:54 am

Besides that, there are two main problems with this environment where I have a menu to call an interview and then the interview returns the control to the menu:
1. If I use the interactive=ask option to be able to show the dropbox icon, when the control returns from the interview back to the main menu, it returns to this initial screen, and not directly to the menu that I wanted.
2. The dropbox connection, when started from the menu program, it will only try to upload to the server the menu file, not the external files, which are the result of the real interview.
Best
Ari
Best
Ari

josh
Posts: 1632
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Synchronization using dropbox

Postby josh » March 15th, 2018, 8:28 pm

The simple sync setup from the options dialog is not designed to be used from a menu program. In a menu program you would usually use the sync logic functions (syncconnect, syncdata...). If your program is complex enough to require a menu the assumption is that you generally have more than data file to sync (main file plus one or more external files) and/or universe for the synchronization. For an example of sync from a menu program checkout the "synchronization from logic" example in the examples directory.

AriSilva
Posts: 165
Joined: July 22nd, 2016, 3:55 pm

Re: Synchronization using dropbox

Postby AriSilva » March 16th, 2018, 9:21 am

I used the synchronization in logic example to create my application, and it works well, using the csweb. My problem is that I´m not sure I´ll be able to install a server in time for this survey, so I was trying to have a plan B using dropbox.
I do need to have two environments, one to handle all the options, and the other to execute the interviews.
I´ll explain that in more detail in another post n the Entry chapter, since I´m having some difficulties in emulating the execution in windows into the tablet.
Best
Ari
Best
Ari

josh
Posts: 1632
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Synchronization using dropbox

Postby josh » March 16th, 2018, 9:36 am

You can use logic sync for Dropbox too. Just change syncconnect(CSWeb, ...) to syncconnect(Dropbox)

arkagwa
Posts: 88
Joined: November 18th, 2014, 5:25 am

Re: Synchronization using dropbox

Postby arkagwa » March 29th, 2018, 1:26 pm

Dear Josh

I have two Dropbox accounts. My CSPro data entry UG Tool form was using old Dropbox account (arkagwa@yahoo.com). I have copied the the same form to another directory and added two more variables in the dictionary, re-configured again through sync option with new Dropbox account (researchexperts2015@gmail.com), and tested the connection was successful. I then published the .pen file and deployed successful into new Dropbox account. Unfortunately the the "CSPro" folder is not created on new Dropbox account and data are synchronised to old Dropbox. This is very dangerous situation because the dictionary has been updated/changed with two more variables which can distort the old data in the old Dropbox server. CSPro app is connected and available in the connected apps in new Dropbox account. moreover when new tablets add the this new account and sync no form is found in the account but my old tablet that used the old form can sync data and download updates/reinstall the forms

what might be the problem? what should i do to disconnect old Dropbox server?
Old Account
Screenshot 2018-03-29 20.15.27.png
Screenshot 2018-03-29 20.15.27.png (36.03 KiB) Viewed 1024 times

New Account
Screenshot 2018-03-29 20.14.26.png
Screenshot 2018-03-29 20.14.26.png (31.83 KiB) Viewed 1024 times
Attachments
UG FORM.zip
(48.75 KiB) Downloaded 58 times

josh
Posts: 1632
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Synchronization using dropbox

Postby josh » March 29th, 2018, 1:51 pm

The first time you log in to the tablet it saves the Dropbox account and uses it for future connections. This is saved on the tablet, not in the pen file. So if you switch to a new Dropbox you need to delete the saved Dropbox account from the tablet and then sync again to use the new Dropbox. This post describes how to delete the saved Dropbox account: viewtopic.php?f=11&t=2105&p=6865

arkagwa
Posts: 88
Joined: November 18th, 2014, 5:25 am

Re: Synchronization using dropbox

Postby arkagwa » March 29th, 2018, 3:19 pm

Dear Josh

Be blessed thanks very much it worked very fine... :D :D :mrgreen:

blumski
Posts: 9
Joined: May 7th, 2018, 7:02 am

Re: Synchronization using dropbox

Postby blumski » June 6th, 2018, 7:30 pm

I'm a supervisor. suppose that I have 5 interviewers who sent me data collected through Bluetooth synchronization. Is it possible to send all the 5 .csdb files to the Dropbox account at the same time or I have to send them one after one?


Return to “Synchronization”