cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

I'm trying to enable offline OData in an Android Application. I created the application via the creation wizard in Android Studio and everything worked fine with the online OData. Then I followed this guide:

https://developers.sap.com/hk/tutorials/cp-sdk-android-wizard-app-offline.html#db432312-0f49-4553-b3...

but I encounter this problem: on the first launch the offline data store in created according to the backend data, nevertheless If I try to edit a record and then closing the app, when i open it again the edited record is still there even if there was no change on the backend data, like the app is not actually refreshing the offline store but just showing a saved copy of it.

Can anyone help?

0 Likes
View Entire Topic
Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Likes

Offline OData has some limitations which include function imports.

The list of limitations is listed at

Version Support and Limitations

Former Member
0 Likes

I managed to send updated data to the backend thank you. Now i have the same problem exposed in the original question: when the updated data is sent to the backend if i maually prevent any modifcation on backend data after the sync offline data still show the offline modifications. If I perform a second download of the offline data the "et_entityset" table sent by the backend contains the correct data while the offline data store contains the old data with the offline modification that i stopped. What can be the cause of this phenomenon?

Thank you very much

Former Member
0 Likes

I'll try to make it more clear because maybe i'm not so good to express myself in english, I am sorry:

when i open the OfflineDataProvider for the first time a call to the backend is peerformed to retrieve the data.

Then if I call the UpdateEntity method on the Offline service container my offline data is successfully updated.

If then I perform a sync my locally updated data is correctly pushed to the backend.

But if i perform a sync but on the backend side something goes wrong and the backend data is not correctly updated, with the download operation after the upload i would expect to see my offline data restored to the ones i had before my update operation on the local data. So if:

Local Data = A ; Backend Data = A

then

Local Data = B ; Backend Data = A

Sync

Upload: Local Data = B --> Backend Data = still A because something was wrong

Download: Backend Data = A --> Local Data = i would expect to restore it to A but it stays = B.