It just depends on what kind of server you're dealing with.
If it's your own, you could implement a simple push scheme by keeping
the TCP/IP connection open after the initial data download, and having
the server send new data over this connection. The client would just
check every few seconds if the socket has readable data, and if so, read
it and update the UI. A variation of this would use two connections, one
for notifications, and one for data.
As far as the UI goes - first, you could display the standard progress
wheel in the activity's title bar, second, you could add a special
footer to your list view that says "Loading..." and is then pushed out
of sight by the new data item.
-- Kostya
04.03.2011 7:14, Chris Stewart пишет:
I have a service I'm pulling data from and they suggest doing so every
5-10 seconds it's designed to be a near-real-time experience. I'm
currently pulling this information down and displaying it in a
ListView. During the initial load, I toss up a basic ProgressDialog so
the user knows information is being loaded. However, introducing that
automatically in such a short increment of time would be an annoying
user experience.
Is there a nice way to approach this problem in Android? I'd like to
be able to run an update on the data I'm pulling from the web without
disrupting the end user's experience. Ideally, not even disrupting
them if they happen to be scrolling the view. The data itself will
always be additions to data that's already been pulled down, so
essentially I'm adding records to my Adapter every 5-10 seconds.
--
Chris Stewart
http://chriswstewart.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en