报错信息:
Uncaught Attempt to read from field 'java.lang.Class io.dcloud.invocation.c.b' on a null object reference;at android.print.PrintManager.print
代码块:
var printDocumentAdapter = plus.android.implements('android.print.PrintDocumentAdapter', {
"onLayout": function(oldAttributes, newAttributes, cancellationSignal, callback, extras) {
},
"onWrite": function(pages, destination, cancellationSignal, callback) {
}
});
var main = plus.android.runtimeMainActivity();
var printManager = main.getSystemService(Context.PRINT_SERVICE);
printManager.print("test", printDocumentAdapter, null);
求大神指教
2 个回复
小雨_0128 (作者)
附Android代码
FullStack - 【插件开发】【专治疑难杂症】【ios上架、马甲包、白包、过审、已成功上架过几百个】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=22130】【非诚勿扰】QQ:543610866
系统打印、AirPrint、支持ipad、打印图片 pdf webView:https://ext.dcloud.net.cn/plugin?id=7147