1-) Android RMOS - imageView to base64
public String getBase64() { try { BitmapDrawable drawable = (BitmapDrawable) imageView2.getDrawable(); Bitmap bitmap = drawable.getBitmap(); ByteArrayOutputStream stream = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.PNG, 90, stream); byte[] image = stream.toByteArray(); //System.out.println("byte array:" + image); String resimm = Base64.encodeToString(image, 0); return resimm; } catch (Exception ex) { return ""; }}