Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cordova-plugin-file-opener2 in ionic-native #295

Closed
annalyntabmore opened this issue Jul 14, 2016 · 8 comments · Fixed by #497
Closed

Add cordova-plugin-file-opener2 in ionic-native #295

annalyntabmore opened this issue Jul 14, 2016 · 8 comments · Fixed by #497

Comments

@annalyntabmore
Copy link

Can someone help me to add this https://github.com/pwlin/cordova-plugin-file-opener2 in ionic-native? thanks.

@ihadeed
Copy link
Collaborator

ihadeed commented Jul 14, 2016

how is this different than cordova-plugin-file ?

@annalyntabmore
Copy link
Author

I'm using it to open a file.

@ihadeed
Copy link
Collaborator

ihadeed commented Jul 15, 2016

I understand. Aren't you able to do that using the file plugin? see here:
https://github.com/driftyco/ionic-native/blob/00793fd3ff0ece518bfe99425b67c291688b34b3/src/plugins/file.ts#L290-L315

It's not merged yet, but I believe it should give you the functionality you need.

@annalyntabmore
Copy link
Author

Ok I'm gonna try this.thank you :)

@ihadeed
Copy link
Collaborator

ihadeed commented Jul 15, 2016

Would be great if you can download the npm package attached with that PR and test it.

@ghenry22
Copy link
Contributor

ghenry22 commented Jul 18, 2016

The file plugin let's you access files directly within your app. This lets you open files in the default system.app from.within your app.

Display an image in your app vs
Open the image in the native image gallery

Could be useful.in some scenarios to throw pdf files for example.out to a pdf reader rather than opening them in the app.

@eddyng8
Copy link

eddyng8 commented Aug 19, 2016

Is there a timeline on when this FileOpener2 plugin be added to ionic native?
In the meantime, is there another way of using the plugin without ionic-native?

@ihadeed
Copy link
Collaborator

ihadeed commented Aug 21, 2016

@eddyng8
No timeline at the moment.

To use without Ionic Native, do the following:

  1. Install plugin
  2. In every page that you need to call the plugin, add this to the top of the page declare var cordova: any;
  3. Use the plugin via cordova.plugins.fileOpener2 variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants