Skip to content

x-b-e/capacitor-file-opener

 
 

Repository files navigation

⚠️ Deprecated repository

This project has been moved to the following monorepo: capawesome-team/capacitor-plugins.



File Opener

@capawesome-team/capacitor-file-opener

Capacitor plugin to open a file with the default application.


Maintainers

Maintainer GitHub Social
Robin Genz robingenz @robin_genz

Demo

A working example can be found here: robingenz/capacitor-plugin-demo

Android iOS

Installation

If you are an Insider, see Getting started with Insiders and follow the instructions to install the plugin.

If you are not an Insider, please install the package from the public npm registry:

npm install @capawesome-team/capacitor-file-opener
npx cap sync

Configuration

No configuration required for this plugin.

Usage

import { FileOpener } from '@capawesome-team/capacitor-file-opener';

const open = async () => {
  await FileOpener.openFile({
    path: 'file:///var/mobile/Containers/Data/Application/22A433FD-D82D-4989-8BE6-9FC49DEA20BB/Images/test.png'
  });
};

API

openFile(...)

openFile(options: OpenFileOptions) => Promise<void>

Open a file with the default application.

Only available on Android and iOS.

Param Type
options OpenFileOptions

Since: 0.0.1


Interfaces

OpenFileOptions

Prop Type Description Since
path string The path of the file. 0.0.1
mimeType string The mime type of the file. If not specified, the mime type will be determined. 0.0.1

Changelog

See CHANGELOG.md.

License

See LICENSE.

About

⚡️ Capacitor plugin to open a file with the default application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 40.4%
  • Java 29.1%
  • TypeScript 11.3%
  • Ruby 8.8%
  • Objective-C 6.1%
  • JavaScript 4.3%