Skip to Content
author's profile photo Former Member
Former Member

Android Offline Store - Refreshes and Updates

Hi,

Currently we're using store.refresh(); to refresh the offline store which refreshes all the requests specified in configuration file.

But i want only specific request to be refreshed.

Is it possible to achieve this with SMP 3.0 SP05 android SDK.

[endpoint]

Name=OrderExample

prepopulate_offline_db=SHARED-ONLY

prepopulate_offline_db_interval=1440

indexed_type=SAPODataExample.CustomerType: Surname, GivenName

indexed_type=SAPODataExample.CustomerType: Address/Province, Address/City

[defining_request]

name=Customers

is_shared_data=N

[defining_request]

name=Orders

is_shared_data=N

[defining_request]

name=OrderItems

is_shared_data=N

[defining_request]

name=Products

is_shared_data=Y

refresh_interval=1440

For example in the above configuration i want to refresh/update only 'name=Customers' request.

Also i want to get only top 20 records which are modified recently.

Thanks,

Sukesh N

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Nov 20, 2014 at 10:31 PM

    Regarding your question:

    Yes it is possible todo what you are requesting:

    1. Defining requests are configured on the server, but specified on the client. Therefore; on the client, the app should have a defining request with name “Customers”.

    There is a refresh method which takes a list of defining requests names (refreshWithRefreshSubset on iOS). In Android, it is called refresh. So you need to use that function and pass in “Customers”.

    2. You can’t refresh only the first 20, we don’t allow that. However, If you need to refresh a limited number of entities from a particular set, you need to split it up into two defining requests. For
    example, if Customers in the Canada is a higher priority what you can do is have
    two defining requests:

    ~/Customers?$filter=Country eq ‘Canada’

    ~/Customers?$filter=Country ne ‘Canada’

    Thx

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 06, 2014 at 03:00 AM

    Former Member

    Have a look at this write-up

    Getting Started with the Offline Store for Android

    Regards,

    JK

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.