1

I'm developing a personal project with Android and struggling here with some doubts about the better way to develop it.

Well, my project consists of my app consuming a Rest Webservice (which I already developed with Java and Spring) and showing up a list of places on it. The thing is: This list could be huge, something like 2000- 3000 records with description and picture of each place.

I'm using volley and OKHttp to take care of my networking stuff, so far my list of places isn't that long, so everything is alright, but I'm afraid when the list starting to get big, I don't know how my app will handle this.

My questions would be:

1- Should I store the that list on my device and update the list every time I connect to the webservice?

2 - Am I doing correct, retrieving the entire list with just one request? If not, how's the best way to do it?

Thank you guys, I'm new to android stuff, and I'm developing everything by myself, don't have anyone experience around to ask that.

Cheers!

Rafael Paz
  • 497
  • 7
  • 22
  • use query parameter for your webservice: /myRestServicePoint/?offset=30&count=50 Then it is possible to retrieve only a portion of the data. You have to implement these of course in your webservice – DZDomi Feb 28 '16 at 23:52
  • You should implement pagination for your REST api, something like GET: /api/places?from=1&take=20. In your android app you can load sections of that list at a time with the help of "from" and "take" args. – Tudor Luca Feb 28 '16 at 23:53
  • Thanks guys for these insights. I'll google more about it! I appreciate it! – Rafael Paz Feb 28 '16 at 23:58

1 Answers1

1

As mentioned in comments You need your app to do "paging" and to load some of the content every time you scroll down.

For example if you will open Facebook app and go over photos you will notice that the first ones always loading the fastest and as you keep scrolling some will be left blank for few moments, thats what paging is all about.

Make sure though not to overload the app with info, specially if you use bitmaps You can read some good tutorials here

Roee
  • 1,155
  • 3
  • 15
  • 24