When you want to open files inside your Ionic app you’ll most likely have to interact with the local filesystem in some way – something that’s not always easy and obvious from the outside.
In this Quick Win we will build an app to open both a PDF that we supply with our app and one that we first download and then display. In contrast to the previous version for Ionic 3 we will now have a switch between iOS and Android to handle things differently.
With the previous Document Viewer plugin we had to use a specific app on Android, so this time we are rolling with a more general plugin that will automatically use your preferred reader.
The full quick win with snippets is only available to Ionic Academy members.
Join now for
- Unlimited access to all quick wins
- Library of 40+ step-by-step video courses
- Support for Ionic questions via Slack & private community
Is there any good solution on Android that doesn’t require the user to have an external PDF opener application installed?
Yes, use docs.google.com and it’s best solution for not only pdf, but also .doc, .docx, .ppt, .pptx, .xls, .xlsx etc