I have been successfully printing images to iMZ series printers from an Android device for a year.
I just switched the SDK (ZSDK_ANDROID_API.jar) from version v2.0.5152 to v2.9.2275.
Now instead of the image the raw byte are printed out (XAFO00GF......)
Can anybody explain this change in behaviour.
The code I am using is;
ZebraPrinter zebra = ZebraPrinterFactory.getInstance(_printerConnection);
int x = 0;
int y = 0;
BitmapFactory.Options options = new BitmapFactory.Options();
options.inScaled = false;
Bitmap bm = BitmapFactory.decodeResource(getResources(), id, options);
ZebraImageI image = ZebraImageFactory.getImage(bm);
zebra.printImage(image, x, y, 0, 0, false);
Your code apparently is correct, and it should work fine, however, the printer language should be reconfigured in "ZPL or CPCL" to interpret correctly the data that is being sent to the printer.
If the printer is in "line_print" mode, it is very possible that happens the behavior you described.
Please, could you verify if your printer is in "line_print" mode.