It works encoding the image in this way: Bitmap photo; //This is the bitmap of your photo ByteArrayOutputStream stream = new ...
Lee mas