• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 393
  • Last Modified:

Sending an image from servlet to mobile phone


I am building a project that has this impementation:

- the user uses the mobile phone to take a picture.
-the user sends the picture to the server(tomcat)(first the user is authenticated)
- with the picture the user sends a friend's phone number.
- server insert the picture into database and send it also to the friend (phone number entered by user)
My question:
any idea how to send the picture from server to the phone.(code samples would be aprecciated)

  • 2
2 Solutions
Send an HTTPRequest (POST) with the bytes of the PNG image in the body. In the client - use the Image.createImage(byte[])  method to create your image.
* Sorry... Response
ArbenCelajAuthor Commented:
Thank you for your response.
The problem is: I  can not control the client. I want to send the image in any moble phone based on the phone number.

No, you cannot "push" images to handsets (unless you have a client running on it).
I would recomment you to send an SMS with a URL of the message.
The user then clicks on the url to download the image.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

SMB Security Just Got a Layer Stronger

WatchGuard acquires Percipient Networks to extend protection to the DNS layer, further increasing the value of Total Security Suite.  Learn more about what this means for you and how you can improve your security with WatchGuard today!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now