Android-XML-to-PDF-Generator icon indicating copy to clipboard operation
Android-XML-to-PDF-Generator copied to clipboard

xmlToPDFLifecycleObserver unnecessary control ask

Open benenesyildirim opened this issue 10 months ago • 0 comments

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.

benenesyildirim avatar Feb 06 '25 06:02 benenesyildirim