How to implement a j2me client that fetches large data (about 5000 entries) and updates from server in real time

StackOverflow https://stackoverflow.com/questions/22732301

  •  23-06-2023
  •  | 
  •  

Question

Am using codename one for the client side and java servlet for the server side.

I have a list of information(text, pictures and audio) on the server that changes frequently and a mobile client that let users view these information.

Please, what is the best approach for fetching all these information and reflecting all the changes(updates to the data) on the client in real time, so as to avoid out-of-memory error, long time network lock on the client UI and make the updates appear in real time for all the data.

Was it helpful?

Solution

The servlet needs to provide a limit argument which you can use when sending a request to fetch only a part of the data. You can then use the UI to present only the relevant portion of the data. e.g. using an infinite scrolling paradigm:

http://www.codenameone.com/3/post/2013/09/till-the-end-of-the-form.html

Or using a list model:

http://code.google.com/p/codenameone/source/browse/trunk/CodenameOne/src/com/codename1/cloud/CloudListModel.java

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top