0

I've tried so many methods to open my document file (pdf, xls, docx) and one method is using cordova-plugin-file-opener2 I've already tried adding the plugin where the link should be in github, but it still doesn't work. When I tried using it, It shows this error:

Error: exec proxy not found for :: FileOpener2 :: open
Error status: undefined - Error message: undefined

Am I missing something?

P.S. I've already tried cordova-plugin-file and cordova-plugin-file-transfer but still doesn't work. And I'm confident that the FileOpener2 is much more convenient than the other plugins to open a file.

Anyway, here's my code. I hope someone can help. I've been stuck for like 1 week now.

cordova.plugins.fileOpener2.open(
                filePath,
                'application/pdf',
                {
                    error : function(e) {
                        console.log(filePath);
                        console.log('Error status: ' + e.status + ' - Error message: ' + e.meesage);
                    },
                    success : function() {
                        console.log('file opened successfully');
                    }
                }
            );
  • There are some cordova plugins which are only compatible to some platforms and for such there is possibility that for browser this particular plugin is not available – Ramakant Singh Nov 06 '18 at 09:43
  • Oh God! Thank you for your comment! So what you're saying is that I should really be running this on my android device? because I've been running through the browser actually and I've really been stuck here. Will try running it on an android device. Thank you very much @RamakantSingh ! – Christian Jeunesse Alegado Nov 07 '18 at 03:40

0 Answers0