cesarvr / pdf-generator

Cordova plugin to generate pdf in the client-side
MIT License
107 stars 61 forks source link

Landroid (light greylist, linking) - Android 9 #107

Open 123dma opened 4 years ago

123dma commented 4 years ago

An error message appears when printing on Android 9:

Google deprecated some APIs for public use in Android 9 - Android 8 and below still fine.

The specific log messages are:

E/PDFPrinterWebView: creating a new WebView adapter. Accessing hidden method Landroid/print/PrintDocumentAdapter$LayoutResultCallback;-><init>()V (light greylist, linking) E/PDFPrinterWebView: creating a new print job.

This means, the usage of PrintDocumentAdapter. needs to be reworked.

https://developer.android.com/distribute/best-practices/develop/restrictions-non-sdk-interfaces

cesarvr commented 4 years ago

Those methods are being call because in those days that was the only way to get Android to transform PDF's to Base64, looking for somebody interested on re-write this using a modern implementation.