Skip to Content
Jul 06, 2020 at 08:52 AM

How to manage Offline store? - Retry request issue.


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.

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:

  • Error archive set
but the results of error listed was always 0. Seems like ErrorArchiveSet never had some entry.

  • Stop repeatable request in the mobile services configuration file
  • Lots of broken API command like:

OfflineOdataProvider - Clear();
OfflineOdataProvider - Close();
OfflineOdataProvider - CancelDownload();
OfflineOdataProvider - CancelUpload();
OfflineOdataProvider - RemoveDefiningQuery();
OfflineODataRequestOptions - setUnmodifiableRequest(boolean unmodifiableRequest)
OfflineODataDelegate - updateFailedRequest()


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()
	OfflineODataDefiningQuery notificationDetailSetQuery = new OfflineODataDefiningQuery("NotificationDetailSet_" + StringValue.of(qmnum), dataQuery, false);

	try {
	} catch (OfflineODataException ignored) {
		// if enter here, means that the query already exist

	List<OfflineODataDefiningQuery> detailSubset = new ArrayList<>();
	detailSubset.add(notificationDetailSetQuery);, () -> {

		loadDetail = true;
	}, (error) -> {