What is the purpose of setPage() function of NetmeraService in Netmera Android SDK? For example, when we search as setPage(3) and setMax(10), is it creating a query for 30 results and respond as pages of 10?
Asked
Active
Viewed 203 times
1 Answers
2
setPage()
and setMax()
methods are used to make pagination during the search, but they are not used as you describe.
setMax()
method is used to define total number of results returned from the search. Default value of setMax()
is 10. For example, if you set setMax(15)
then 15 result will be returned as a search result in each call.
setPage()
is used to retrive the contents of the given page. Default value of setPage()
is 0 . if you set setPage(1)
then it will skip page*max
content and retrieve the other max
content.
For example, if you set setPage(1)
and setMax(20)
then, it will skip 1*20 contents and retrieve the contents between 21-41.

Parvin Gasimzade
- 25,180
- 8
- 56
- 83