@whiteguru/capacitor-plugin-file-opener
TypeScript icon, indicating that this package has built-in type declarations

6.0.1 • Public • Published

capacitor-plugin-file-opener

Capacitor plugin to open files

Install (Capacitor 6.x)

npm install @whiteguru/capacitor-plugin-file-opener
npx cap sync

or for Capacitor 5.x

npm install @whiteguru/capacitor-plugin-file-opener@^5.0.0
npx cap sync

or for Capacitor 4.x

npm install @whiteguru/capacitor-plugin-file-opener@^4.0.0
npx cap sync

or for Capacitor 3.x

npm install @whiteguru/capacitor-plugin-file-opener@1.1.4
npx cap sync

Setup Android

Add or update next lines inside <manifest> tag on your AndroidManifest.xml

<manifest>

  <!-- Rest of manifest -->

  <queries>
    <intent>
      <action android:name="android.intent.action.VIEW" />
      <!-- If you don't know the MIME type in advance, set "mimeType" to "*/*". -->
      <data android:mimeType="application/pdf" />
    </intent>
  </queries>
</manifest>

API

open(...)

open(options: FileOpenerOptions) => Promise<void>
Param Type
options FileOpenerOptions

Interfaces

FileOpenerOptions

Prop Type Description
path string Path to file
mime string Mime to select (optional, android only)

Readme

Keywords

Package Sidebar

Install

npm i @whiteguru/capacitor-plugin-file-opener

Weekly Downloads

170

Version

6.0.1

License

MIT

Unpacked Size

18.7 kB

Total Files

25

Last publish

Collaborators

  • dragermrb