Android-XML-to-PDF-Generator
Android-XML-to-PDF-Generator copied to clipboard
xmlToPDFLifecycleObserver unnecessary control ask
PDFGenerator.class: 420
if (xmlToPDFLifecycleObserver != null) {
xmlToPDFLifecycleObserver.setPdfSaveListener(uri -> {
writePDFOnSavedBlankPDFFile(document, uri);
});
Intent intent;
intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
intent.putExtra(Intent.EXTRA_TITLE, fileName);
intent.addCategory(Intent.CATEGORY_OPENABLE);
getPDFIntent(fileFinalResult, intent);
xmlToPDFLifecycleObserver.launchPDFSaverPicker(intent);
} else {
writePDF(document, fileFinalResult);
}
This code is not workinng for just opening to pdf. Because its not controlling what is the action. Its just looking for is xmlToPDFLifecycleObserver null or not. It need to check what action it is.