Mobile Applications and Games development
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Loading multiple images.

3 posters

Go down

Loading multiple images. Empty Loading multiple images.

Post  suz Thu Sep 20, 2007 5:46 am

Hi,
does anyone have suggestions on how to load multiple images dynamically from web server, with one http request. I can do it with single http requests per image, but i want to download multiple images with one go.

suz

Posts : 12
Join date : 2007-09-20

Back to top Go down

Loading multiple images. Empty Re: Loading multiple images dynamically

Post  Nishtha Thu Sep 20, 2007 5:47 am

Hi,

There is solution to this problem, You can recieve multiple images together by multipart http response.For more queries you can contact me.

thanks
Nishtha

Nishtha

Posts : 25
Join date : 2007-09-09

http://sahil-bedi.blogspot.com/

Back to top Go down

Loading multiple images. Empty Re: Loading multiple images.

Post  guantana Thu Sep 20, 2007 6:02 am

Hi suz,

Using multi-part in your protocol is a scalable solution. You may send a number of images along with text information(optional) for each image. But it adds few KB in your jar. Should be used only if u want long term extendable solution.

If know the size of images in advance then youmay get all images in single stream and then break the byte[] according to individual image size. It is the simplest and fastest approach.

Do let me know for further queries.

Guantana
guantana
guantana

Posts : 22
Join date : 2007-09-09
Location : New Delhi, India

http://guantana.blogspot.com

Back to top Go down

Loading multiple images. Empty Re: Loading multiple images dynamically

Post  suz Thu Sep 20, 2007 10:17 pm

Hi all,
Thanks for your help. Please could you tell me more about downloading multiple images with one http request using Multipart Http Response. Does it involve zipping all images?

suz

Posts : 12
Join date : 2007-09-20

Back to top Go down

Loading multiple images. Empty Re: Loading multiple images.

Post  guantana Thu Sep 20, 2007 10:31 pm

Hi suzz,

Multipart is a format of the content that may be send over http. In multipart format u may embed multiple parts where each part could be text(like xml) or binary (like image/ audio/ video).

What need to do for this?
At server side, you need an Multipart generator (MultipartOutputStreamWriter), which writes multiple parts in a single response stream.
At client side, you need Multipart parser, which could seperate out all the parts from single stream.

I used it in my last project, and it really saved a big overhead by sending multiple chunks in a single request.

If you don't find these files on net, do let me know. I will mail it to you.

Guantana.
guantana
guantana

Posts : 22
Join date : 2007-09-09
Location : New Delhi, India

http://guantana.blogspot.com

Back to top Go down

Loading multiple images. Empty Re: Loading multiple images.

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum