I am trying to create a plugin for Unity3D using Android Studio.
I can show just a toast using this plugin, but I canβt work with 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 the error message: NoClassDefFoundError: Landroid permission failed / support / v4 / print / PrintHelper
What am I doing wrong? I am testing an Android 5.0 device (printing requires API level 19)
Thanks.
source
share