Web Sockets? Which browsers on Android even support it? I have the most up to date DolphinHD for Android 2.2, and it does not support Web Sockets (at least according to Jim Bergman's Javascript code for testing this).
But I am glad you pointed out that he should poll less frequently: people often underestimate what a drain this is on the battery. On Jul 14, 3:01 pm, Mark Murphy <[email protected]> wrote: > On Thu, Jul 14, 2011 at 2:15 PM, Thulasi <[email protected]> wrote: > > I am trying to implement an application which requires polling the server > > every few seconds. what is the best way to proceed?? > > Poll less frequently, on a user-defined interval. > > Better yet, use some sort of long-poll mechanism (Web sockets, Comet, > etc.) or a push engine (C2DM, Xtify, Urban Airship). > > > I have a problem with Asynctask as i may need to create a Asynctask for each > > request?? any other solutions or comment is appreciated.. > > Unless these polls are supposed to happen in parallel, I would single > manually-constructed background thread. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android App Developer Books:http://commonsware.com/books -- 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

