Skip to Content
avatar image
Former Member

Offline store in SMP3.0 SP05 android

Hi,

I have a doubt regarding offline store creation during subsequent login to application.

Below code is used to create offline store and it's working fine.

private static ODataOfflineStore offlineStore;

ODataOfflineStoreOptions options = new ODataOfflineStoreOptions();

options.host = url.getHost();

options.port = String.valueOf(url.getPort());

options.enableHTTPS = lgCtx.isHttps();

options.serviceRoot= endPointURL;

IManagerConfigurator configurator =

LogonUIFacade.getInstance().getLogonConfigurator(context);

HttpConversationManager manager = new HttpConversationManager(context);

configurator.configure(manager);

options.conversationManager = manager;

options.enableRepeatableRequests = false;

options.storeName="flight";

offlineStore = new ODataOfflineStore(context);

offlineStore.openStoreSync(options);

My question is do we need to create new offline store each time we login to application.

If we create offline store each time we login to application then all the data will be synced again!!!

Is there any API to get the instance of already created offline store so that it can be used for subsequent operations?

Regards,

Sukesh N

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 05, 2015 at 01:39 PM

    Hi Sukesh,

    If you are referring to relogin to an app after a successful logout, you have to create a new offline store since the deleteUser (logout) operation deletes all registration information from the device.

    In the actual scenario the user never logout, he has to set an app passcode in the initial login, it will be used in subsequent use of app instead of login.

    Regards, Midhun

    SAP Customer Experience Group - CEG

    Add comment
    10|10000 characters needed characters exceeded