cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BTP Android Offline data SYNC upload is not working.

imandihemanth
Explorer
0 Kudos
260

Hi Experts
I am using SAP BTP Android SDK.
Offline database I have implemented in my project.
As per requirement I am updating some entity values of the Offline data and it is working for internal database.
Next I have to sync those changes to cloud.
For that I am uploading the offline changes and getting success callback.
But changes are not uploading to cloud.
Can anyone please help me. Below code snippet I have used.

For data updating in offline store:-
dataService.updateEntityAsync(entity,successHandler,failureHandler);

To upload the changes to cloud(Sync):-
offlineODataProvider.upload(successHandler,failureHandler);

After upload I am downloading the new changes from cloud:-

offlineODataProvider.download(successHandler,failureHandler)

lxsun
Advisor
Advisor
0 Kudos

Could you help check if there any error in ErrorArchive after the calling of upload function?

You could call offlineODataProvider.getErrorArchive() to get the error list. If any issue happen at server side, it will tell you what' wrong with the uploading.

imandihemanth
Explorer
0 Kudos

Hi lxsun
I have checked that but didn't found any errors.
I got stuck here. Please help me.

lxsun
Advisor
Advisor
0 Kudos

Hi imandihemanth,

You could call offlineODataProvider.requestQueueIsEmpty before and after the call of upload to make sure that request queue is actually sent to server. The first call should return false, and second call should return true.

If the request was really sent out and can not get it at client after download, One possible reason is that the entity set was not added as defining query when you opened the store. Try to check that.

Another most possible reason is that entity you are updating is configured in shared defining query. For shared entity, server will cache it for all clients and update snapshot ever interval(by default, it's 15 minutes), client only get most recent snapshot which doesn't include recent updates. You could change defining query from shared to nonshared, or anticipate get it later through download.

Accepted Solutions (0)

Answers (0)