Sets the synchronization mechanism for the Offline Native Mobile applications generated by the Main Object. This impacts the code generation and 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 than or equal to 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 ||You are in charge of calling the synchronization programs. GeneXus generates the synchronization programs but they are not executed by the application itself. The Synchronization.Receive method has to be invoked.|
|Never ||You are 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 than or equal to the value set in the Minimum Time Between Receives property. This is the default value.|
Objects: Offline Database
Generators: Android, Apple, Java, .NET, .NET Core
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, the synchronization programs can be called at any time using the Synchronization API.
Note: It is not possible to execute a Receive when there are 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 takes place. Otherwise, the Receive will return an error indicating that it has pending events.
What if the property value is set to Manual?
The synchronization programs are not called automatically. You are in charge of the receiving part of the synchronization. You can decide when to call the synchronization programs 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 synchronization programs. In some scenarios, you may want to create 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 Apple, they are not. In that case, in Apple, 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 the corresponding changes when the property value is configured, Run the main object.
This property is available since GeneXus X Evolution 3.
Offline Database object
Minimum Time Between Receives property
Automatic Offline Data Synchronization
HowTo: Use the Synchronization API
The Data Synchronization Problem
Offline Native Mobile applications