on 2020 Jul 06 9:52 AM
We are developing an Offline Android SDK application from Mobile Services in a Cloud Foundry environment basically we set up the whole application but it seems to be a bit unstable.
PROBLEM:
We are doing (Async) call via OData, if an error occurs for example in the backend function, then the ODATA call will be repeated (a lot) until the forced close of the Offline Store or we must uninstall of the whole application.
The same behavior occurs for timeout error.
We followed different approach and guides on Help SAP portal but we cannot able to achieve our goal.
We tried to approach:
https://help.sap.com/doc/f53c64b93e5140918d676b927a3cd65b/Cloud/en-US/docs-en/guides/features/offlin...
https://help.sap.com/doc/c2d571df73104f72b9f1b73e06c5609a/Latest/en-US/docs/user-guide/odata/Offline...
but the results of error listed was always 0. Seems like ErrorArchiveSet never had some entry.
OfflineOdataProvider - Clear();
OfflineOdataProvider - Close();
OfflineOdataProvider - CancelDownload();
OfflineOdataProvider - CancelUpload();
OfflineOdataProvider - RemoveDefiningQuery();
OfflineODataRequestOptions - setUnmodifiableRequest(boolean unmodifiableRequest)
OfflineODataDelegate - updateFailedRequest()
OfflineODataFailedRequest
ref:
https://help.sap.com/doc/c2d571df73104f72b9f1b73e06c5609a/Latest/en-US/docs/javadoc/offline-odata/re...
https://help.sap.com/doc/c2d571df73104f72b9f1b73e06c5609a/Latest/en-US/docs/javadoc/offline-odata/re...
https://help.sap.com/doc/c2d571df73104f72b9f1b73e06c5609a/Latest/en-US/docs/javadoc/offline-odata/re...
https://help.sap.com/doc/c2d571df73104f72b9f1b73e06c5609a/Latest/en-US/docs/javadoc/offline-odata/re...
The only thing that stopped the error recall seems to be Close - Open store, but it seems a bit too much, besides we haven't managed to Re-open Correctly the offline store even after lots of debug and code writing.
Does anyone know how to stop this OData CALL Retry mechanism?
Or at least make it work correctly because the repeated call doesn't stop even if they return a success state and seems to repeat every 3-5 second.
Example of our offline OData call:
private void loadDetail() {
String qmnum = AppEnvironment.getSessionManager().getCurrentNotification().getQmnum();
SAPServiceManager sapServiceManager = AppEnvironment.getSapManager().getSapServiceManager();
ZPMMOBOFFL_SRV_Entities zPMMOB_SRV_Entities = sapServiceManager.getZPMMOBOFFL_SRV_Entities();
EntitySet detailsEntitySet = ZPMMOBOFFL_SRV_EntitiesMetadata.EntitySets.notificationDetailSet;
EntityType entityType = detailsEntitySet.getEntityType();
String name = NotificationDetail.ivNotif.getName();
Property ivNotifProperty = entityType.getProperty(name);
EntityKey entityKey = new EntityKey().withProperty(ivNotifProperty, StringValue.of(qmnum));
DataQuery dataQuery = new DataQuery()
.from(detailsEntitySet)
.withKey(entityKey);
OfflineODataDefiningQuery notificationDetailSetQuery = new OfflineODataDefiningQuery("NotificationDetailSet_" + StringValue.of(qmnum), dataQuery, false);
try {
provider.addDefiningQuery(notificationDetailSetQuery);
} catch (OfflineODataException ignored) {
// if enter here, means that the query already exist
}
List<OfflineODataDefiningQuery> detailSubset = new ArrayList<>();
detailSubset.add(notificationDetailSetQuery);
provider.download(detailSubset, () -> {
AppEnvironment.getSessionManager().setCurrentDetail(zPMMOB_SRV_Entities.getNotificationDetail(dataQuery));
loadDetail = true;
}, (error) -> {
error(error);
});
}
User | Count |
---|---|
70 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.