Document Viewer documentation not working

So I followed the documentations;

firstly I changed

import { DocumentViewer } from ‘@ionic-native/document-viewer’;

to

import { DocumentViewer , DocumentViewerOptions} from ‘@ionic-native/document-viewer’;

not sure if that is correct.

But when I try to add the options

  
     const options: DocumentViewerOptions = {
         title: '',
        }
        

It says it is not assignable to type. What am I doing wrong?

Is this in https://ionicframework.com/docs/native/document-viewer/#Usage?[quote=“insightmichael, post:1, topic:94670”]
What am I doing wrong?
[/quote]

Did you follow the instructions and https://ionicframework.com/docs/native/#Add_Plugins_to_Your_App_Module?

I added DocumentViewer not DocumentViewerOptions as well. Should I be doing this?

What does the Usage example do?

Just DocumentViewer. I know there is some active development going on git-hub for this module today.

If I don’t include DocumentViewerOptions, it isn’t referenced correctly.

Have you tried setting this up from the docs yourself? I am not sure they are correct or if the module works. Th
ink it is newly built.

No.

This is the current code (which also includes it’s matching documentation):
https://github.com/ionic-team/ionic-native/blob/master/src/%40ionic-native/plugins/document-viewer/index.ts

I tested it in a blank project and you are right.

  1. Import of DocumentViewerOptions is missing.
  2. The object from the example doesn’t work.

Please create an issue at the ionic-native repo.

Here is the issue/PR that introduced the problems: https://github.com/ionic-team/ionic-native/issues/1565
Include that in your issue.

Thanks, I have seen this. I don’t think I am going to use this plugin as it opens up more problems.

see Android build fail. Execution failed for task Multiple dex files

I submitted an issue: https://github.com/ionic-team/ionic-native/issues/1706