[ask] responsiveness getting data from web service

by Handita Okviyanto » Tue, 05 Apr 2011 00:14:06 GMT


Sponsored Links
 Hey guys
 I wanna ask something about getting data through the web. About
consuming data from webservice. I just newbie in android. I want to
connect my application to json data on the web. I successfully made it
and running it. But the problem is about responsiveness. I using
thread to get data from the server. But when I test using my device it
takes so long and then android automatically show a dialog that my
application is not responding and providing user to close it. It maybe
takes more than 5 seconds to fetch data from the server. I am not
understand intent service yet. Maybe somebody can help me to find out
the problem. Or I make mistake in designing my application..? Please
help me

-- 



[ask] responsiveness getting data from web service

by Handita Okviyanto » Tue, 05 Apr 2011 00:14:20 GMT


 Hey guys
 I wanna ask something about getting data through the web. About
consuming data from webservice. I just newbie in android. I want to
connect my application to json data on the web. I successfully made it
and running it. But the problem is about responsiveness. I using
thread to get data from the server. But when I test using my device it
takes so long and then android automatically show a dialog that my
application is not responding and providing user to close it. It maybe
takes more than 5 seconds to fetch data from the server. I am not
understand intent service yet. Maybe somebody can help me to find out
the problem. Or I make mistake in designing my application..? Please
help me

-- 


Sponsored Links


Re: [ask] responsiveness getting data from web service

by Kostya Vasilyev » Tue, 05 Apr 2011 00:19:28 GMT


 Based on this:

But the problem is about responsiveness. I using
thread to get data from the server. But when I test using my device it
takes so long and then android automatically show a dialog that my
application is not responding and providing user to close it. It maybe
takes more than 5 seconds to fetch data from the server.
<<

you are not using a thread, or not using it correctly. One frequent mistake
is to treat Thread as a Runnable and call "myThread.run()" - this does not
start the thread, but rather executes the thread's worker function right
there. Use myThread.start() to start a thread.

Take a look as Androd's AsyncTask class that makes this type of thing
easier, including updating the UI with progress information, and showing the
data fetched from the net in your UI.

-- Kostya

2011/4/4 Handita Okviyanto <viyanatm...@gmail.com>


-- 



Re: [ask] responsiveness getting data from web service

by Handita Okviyanto » Tue, 05 Apr 2011 00:43:30 GMT


 Oke. I will try it.
Thanks for the response




-- 



Other Threads

1. Who is responsible for validation of layout xml file?

That isn't really anything specific to layout files, that is just the
generic code for parsing typed attribute values in XML files.  It is part of
the core system image.














-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~

2. H.263 video Codec supported???

Hello,
Greetings!!!
I need few clarifications regarding Streaming...
1. Has H.263 video codec supported???
2. Also, i could not stream thro' www.youtube.com using browser; is
this due to flash player support; but able to do thro Youtube
Application
3. Can i have supported codec format (both audio and video) for
streaming???

Kindly reply if somebody knows the above queries.

thanks,
Sen

--~--~---------~--~----~------------~-------~--~----~

3. problems building an eclipse dev environment as described on http://source.android.com/using-eclips

4. problem with Hello, Gallery R.styleable not resolve

5. Who is responsible for validation of layout xml file?

6. eclipse plug-in installation problem

7. problems building an eclipse dev environment as described on http://source.android.com/using-eclips