This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to view image from server ???  RSS feed

 
moh sak
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am connecting to a server from my application to a url like http:\\localhost:80\myApp\1.jpg
can i display this image on the mobile ? or download it ?? what is the right way to do such thing ?

thanks in advance
 
Debojit Nag
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
yes u can. But for that u have to get the binary data ( raw data) of that particular image into a byte array and the create that image using
public static Image createImage(byte[] imageData,
int imageOffset,
int imageLength)
Cheers
Debojit
 
moh sak
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
thanks for you'r replay i created the image successfully but i still have a problem that how can i save this image to the images directory ?? and another problem, in future (2-5 days from today) my application must be able to save a video clips and themes and sound clips !! how can that be done ?? is wap push the only way ? i don't want to use the wap push so i hope there is another way to do that !!!

thanx in advance
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!