I'm trying to create a plugin for Unity3D using Android Studio.
I can show a simply toast using this plugin, but I cannot get working the printer service.
This is my code:
void PrintThis(byte[] data){
Bitmap bm = BitmapFactory.decodeByteArray(data,0,data.length);
PrintHelper helper = new PrintHelper(UnityPlayer.currentActivity);
helper.setScaleMode(PrintHelper.SCALE_MODE_FIT);
helper.printBitmap("test print",bm);
}
When I call this method I get an error: NoClassDefFoundError: Failed resolution of Landroid/support/v4/print/PrintHelper
What am I doing wrong? I'm testing on an Android 5.0 device (Printing requires API level 19)
Thank you.