cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Mobile Platform Offline Store Android

rakshit_doshi
Active Contributor
0 Kudos

Dear All,

We have been trying to use the offline store for SMP 3.0 for android and following the below links

But we are not able to open the Offline store.

We are using the latest SDK pack SDK SP06.

We also do have a relay server in our infrastructure so we are also supplying the options. URL Suffix parameter as well but the store doesnt open up.

It just strucks on the open function call.

We are using Android Studio for armeabi-v7a devices. We also saw that for armeabi we have two additional files to be imported but the same do not work if we put it inside the armeabi-v7a folder.

Has anyone been able to use this successfully?

Any inputs are appreciated

Former Member

Accepted Solutions (0)

Answers (2)

Answers (2)

rakshit_doshi
Active Contributor
0 Kudos

Former Member can you kindly advice on this

Thanks,

Rakshit Doshi

claudiapacheco
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Rakshit,

I found this note on the documentation, offline features are not supported with relay server yet.

For for SMP 3.0 Server SP05 -> Adding Reverse Proxies or Relay Servers - Administrator - SAP Library


"SAP Mobile Platform supports Relay Server only with application types other than Agentry that use OData services from the OData SDK. Relay Server is not supported for Offline features"

If I find more information, I'll let you know.

Best regards,

Claudia

Former Member
0 Kudos

Hi Claudia,

I work with the iOS framework SP08 PL06 and I have a litlle problem : SODataOfflineStore not exist on my librairies.

I installed MAFReuse, ODataFramework and MAFExtensibility librairies.

I use correctly the onlineStore but I don't see the offlineStore.

I don't know if Android works in the same way that iOS but I suppose there are similarities, do you have any idea why I can't access to these objects? The libraries have much changed between SP06 and SP08 ?

Regards.

claudiapacheco
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Julien,

In android, the offline store library is independent from the online store library and the offline store jar file must be added to the project together with some .so resources.

I'm not familiar with iOS. You should create a new discussion to target the right experts.

Best regards,

Claudia

Former Member
0 Kudos

Hi Claudia,

Thanks to your answer.

Effectively, I had a library problem.

There was a problem during SAP installation on my mac and the library did not copy correctly.

I was able to rectify the problems.

Now I've a problem to open offlineStore. I use a farmId + resourcePath and I use SAML authentication with Onboarding and when I try to open offlineStore, I've a openStoreFailed call method.

I've already publishing my problem here.

Thanks again for your answer.

Julien.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Quick question : What is SMP 3.0 runtime version? To work with SDK SP06, you should have Runtime SP05

rakshit_doshi
Active Contributor
0 Kudos

Hi Jitendra,

We are running the same version. SMP 3.0 SP5 and SDK SP06 but still not able to connect.

Can you provide any inputs if you were able to connect to it.

Thanks,

Rakshit Doshi

midhun_vp
Active Contributor
0 Kudos

Hi Rakshit,

You can find more information on the error from server logs. Increase the offline log level to debug and check. Make sure the Odata service you are using does't comes under limitations of Odata offline : http://help.sap.com/saphelp_smp306sdk/helpdata/en/88/9d29b3fac0456b812d86b5794c6e54/frameset.htm

Regards, Midhun

SAP Technology RIG

rakshit_doshi
Active Contributor
0 Kudos

Dear All,

This is the code snippet that we are using

public class OfflineStore {
private static OfflineStore instance;
private Callback callback;
private String url;
private ODataOfflineStore offlineStore;
public static OfflineStore getInstance() {
if (instance == null) {
instance = new OfflineStore();
}
return instance;
}
public void open(Context context, Callback callback) {
this.callback = callback;
ODataOfflineStore.globalInit();
ODataOfflineStoreOptions options = new ODataOfflineStoreOptions();
try {
url = LogonCore.getInstance().getLogonContext().getAppEndPointUrl();
URL _url = new URL(url);
options.host = _url.getHost();
options.port = String.valueOf(_url.getPort());
options.enableHTTPS = LogonCore.getInstance().getLogonContext().isHttps();
options.serviceRoot = url;
IManagerConfigurator configurator = LogonUIFacade.getInstance().getLogonConfigurator(context);
HttpConversationManager manager = new HttpConversationManager(context);
configurator.configure(manager);
options.conversationManager = manager;
options.enableRepeatableRequests = false;
options.storeName = App.STORE_NAME;
options.definingRequests.put("employees", "Employees");
options.definingRequests.put("equipment", "Equipments");
options.definingRequests.put("functionalLocations", "FunctionalLocations");
offlineStore = new ODataOfflineStore(context);
offlineStore.openStoreSync(options);
Log.e("offline store", ODataOfflineStore.libraryVersion());
} catch (LogonCoreException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (ODataException e) {
e.printStackTrace();
}
}
public ODataOfflineStore getOfflineStore() throws NullPointerException {
return offlineStore;
}
public String getUrl() {
return url;
}