12-24-2008 05:18 AM
i have used this snippet to load image (i have to load images which reside in other server)
i can load image successfully once for one image
but if i make an array of image urls and pass it to above class then it creates problem
class uses thread
for each image i made object of this class and passed image url
it runs well for first image but when it tries to create object for second one, it throws an exceptipon that "cann't create new object.. object already exist "
what i reckoned this is due to httpconnection
i think i can not make multiple connection at a time...
and my requirement is to load 10 image in one screen
so i think i have to wait untill http connection close and make other http request for sub sequent images
and this is bad
anyone who knows the solution or
knows how to load images (resides on other server )
so images will be loaded in thread and mean while data is displayed
12-24-2008 09:41 AM
12-24-2008 06:27 PM
Getting a couple of short files is probably ok but expecting a long string of requests to work out
can be a bit much with out some retry or related logic- DNS errors are one common problem
on some carriers if you use deviceside=true for example. A background que with notification
or somekind of callback would be a good idea. Presumably you would also benefit from local
caching or other means to keep local copies when you restart the app etc.