I need to synchronize data between the server and the client application on Android and for this I created several ASyncTask
classes, one synchronizes the Third parties, the other the Financial, Accounts Receivable and Accounts Payable, for example.
I did this to reuse code, which will be used in other services and activities.
However, the moment the user synchronizes the first time, in Activity
the ASyncTask
are executed one below the other, without checking if the top one has finished the business rule.
My question is the following, when a ASyncTask
is finished, the bottom one is executed or does it start even before the ASyncTask
superiors end the execution?
The problem with this is inconsistency in the Android database, such as the foreign keys, for example when saving the records in SQLite.