Hi, I'm trying to make a synchronization function following the example of the function present in custdb.java, but I did not understand what parameters should I put in the call 'createSyncParms'.
Thanks in advance
createSyncParms(String,String) is expecting the MobiLink user name and the script version name (not username and password). The username along with the remote id help identify who is synchronizing. The version name identifies which set of MobiLink synchronization scripts to use to control what data is synchronized (how the upload is applied to the consolidated, how conflicts are resolved, and what data needs to be downloaded to a particular remote).
createSyncParms(String,String) creates a SyncParms object suitable for HTTP synchronization. createSyncParms(int,String,String) lets you select between HTTP or HTTPS synchronization.
getStreamParms() gives you access to parameters that specifically impact networking.
The next step is to provide the name or ip of the host you want to synchronize to and then what port (if not using the default 80 for HTTP and 443 for HTTPS).
The URL suffix helps you specify additional information for the URL - for example when going through the relay server as in the CustDB sample, you need to identify what user and farm to connect to. On BlackBerry devices, additional networking parameters may also be supplied here.
The rest of the SyncParms object controls the direction of data and what will be synchronized (publications allow you to subset the tables of your remote).
answered 13 Sep '11, 17:49
createSyncParms(String, String) returns a SyncParms class, which you use to provide information to log in to your MobiLink server. The method signature for createSyncParms is expecting a username and version name to access the MobiLink server.
Once you have your SyncParms object, you may need to specify additional synchronization options using the various .set*() modifiers.