11-03-2009 07:09 AM
hi all,
how can I find the maximum number of records that can be displayed on a device.
for example in our application we have a web service, that returns 1388 different locations around the world.
when I call this web service on simulator it works fine but when I tried on device ,
device throws the exception "Application XYZ is not responding; process terminated" and hangs the application.
do anyone have an idea/suggestion/reference about this.
please help me in this regards.
Thanks in advanced.
narendra.
11-03-2009 07:13 AM
In my view displaying all the records on screen in one shot is not a good way to represent the information to the end user, you could display few numbers of screen and then option to view next and previous results will be good.
11-03-2009 08:23 AM
Your error is caused when you hold the UI thread long enough to cause your event queue to overflow.
This is usually caused by performing some type of blocking operation (like HTTP download) in the event thread.
It might also be caused by some other type of lengthy processing in the event thread.
Always start a worker thread for these types of operations.
11-03-2009 08:37 AM
Hi BB Developer,
could you please give some more detail for , how can I implement this.
Thanks.
11-03-2009 12:54 PM
As an academic exercise, a while ago, I tested an application that displayed 15,000 records in a ListField, in a 7290 (very old device). Once the data was loaded, display and scrolling etc was pretty quick. So I would say you should have no problems with the number of rows you have.
Like all these things, there are different ways of coding this sort of application. In addition to what has already been suggested, I think you should think about your application design and the way the User Interface works, to make sure you are processing the data in a way that provides the best User experience without exceeding the capabilities of the BlackBerry.
Typically someone else's design will not work for you, so I suspect rather than attempting to copy what BBDeveloper has done, you should think about how you want your application used and design around that.
Amongst things that I would recommend that you avoid are:
a) Adding individual Fields to a Screen for every item in your list
b) Processing your List (for example sorting it) on the Event Thread
c) Creating a useable version of your List from some other format (e.g. XML) each time you start the application
Hope this helps
11-04-2009 05:24 AM
Thanks Peter,
Your response help me a lot to understand the problem,
Actually code is working now , the problem was actually not related with number of records,
but your suggestion really help us to improve our code.
Thanks again.
Narendra
11-04-2009 05:46 AM
Great narenda. Thanks for letting us know.
Can you mark this as Solved now?