Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 39
Registered: ‎07-18-2008
My Device: Not Specified

HTTP send a jpeg.



So I have a Blackberry application that captures a persons signature via a stylus and the returns a bitmap upon request (there is a cool case you can put on blackberries for stylus stuff).


My problem is, getting the bitmap off the phone to a central server. I'd like to 'append' the image to some pre-exisitng messages that get sent back to the server E.G.




Should I just convert the bitmap to a byte array, then base64 encode it and append it as a string?


The alternative I guess is to try and use the mime multipart type. I dont really understand what I would be doing with the mime message though.


Any pointers?

Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: HTTP send a jpeg.

You can create an encoded byte array using EncodedImage (see API docs).


You could then POST this data to your PHP script.