|This Offline Database Object property applies to the Receive operation in the synchronization process that The Data Synchronization Problem document explains.
Enables the developer to select the synchronization mechanism for the Offline Smart Devices applications generated by that Main Object. This impacts the code generation and the runtime behavior of the app.
|After Elapsed Time ||The synchronization programs are executed every time the elapsed time ( in seconds ) since the last synchronization is greater or equal than the value set in the Minimum Time Between Receives property. Note that if the application launches for the first time, the synchronization programs are also executed.
|Manual ||The GeneXus developer is in charge of calling the synchronization programs. GeneXus generates the synchronization programs but they are not executed by the application itself.Synchronization.Receive method has to be invoked.
|Never ||The GeneXus developer is in charge of coding the synchronization programs if necessary. GeneXus does not generate the synchronization programs.|
|On Application Launch ||The synchronization programs are executed every time the application launches and the elapsed time ( in seconds ) since the last synchronization is greater or equal than the value set in the Minimum Time Between Receives property. This is the default value.
What if the property value is set to On Application Launch or After Elapsed Time?
The application is going to be in charge of receiving the synchronization data automatically, which means that the application calls the synchronization programs by itself.
Although the application executes synchronization programs by itself, calling the synchronization programs is available at any time by using the Synchronization API.
Note: It is not possible to execute a Receive when there exist events pending to be sent to the server. So, when the Receive is automatically executed, and the Send Changes property value is set to When connected, a Send will be automatically executed before the Receive take place. Otherwise, the Receive will return an error indicating that has pending events.
What if the property value is set to Manual?
The synchronization programs are not called automatically. The developer is in charge of the receiving part of the synchronization. The developer can decide when to call the synchronization programs by using the Synchronization.Receive method. Note that this method calls the synchronization programs generated by GeneXus.
What if the property value is set to Never?
GeneXus will not generate the synchronization programs. In some scenarios, the developer may want to create his services to manually receive the data from the server. For more information, please refer to Coding your Data Synchronization programs.
What if the Application is running in the background and 'After elapsed time' is set?
In Android, the synchronization programs are executed as described after the elapsed time; in iOS not. In that case, in iOS, they will be executed the next time the application is launched.
What if the Application is closed?
All synchronization activity is suspended when the application is closed.
Note: 'Never' value is available as of GeneXus X Evolution 3 Upgrade 2.
To apply changes made by this property, Run the main object.
This property is available since GeneXus X Evolution 3 Release Notes.
Objects: Offline Database
Platforms: Web(.Net, Java), Smart Devices(Android, IOS)
Offline Database Object
Minimum Time Between Receives property
Automatic Offline Data Synchronization
HowTo: Using the Synchronization API
The Data Synchronization Problem
Offline Smart Devices applications