• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mobile to website transfer

 
Anandh Ramesh
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i want to transfer an image i took using my cell phone camera to a website. this has to be done immediately after i take the picture. i am new to mobile development and don't know how to do this. can anybody help me with this situation?

-Anandh Ramesh
 
payal agrawal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the URls below:

Capturing Video on J2ME devices
http://www.java-tips.org/content/view/839/73/

Displaying Image from Servlet on J2ME device
http://www.java-tips.org/content/view/1006/73/

The example in above URl will give you idea of capturing image from mobile in byte array.

The example in 2nd URL is downloading image data as byte array from webserver, which is exactly opposite to your needs, but I think you can get an idea of how to downlaod/upload data from MIDLet and web server.
 
Rashid Mayes
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Anandh Ramesh,

The easiest way is to use the mmapi to capture the picture and then upload the picture through HTTP. Go here

http://j2me.astrientlabs.com/appdetails.html?id=7

and download the src code. It will help you understand the process. If you plan to use a DataOutputStream and need to write any meta data use the writeUTF/readUTF methods instead of the write len, write bytes method in the example code.

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic