mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-22 01:19:36 +08:00
55 lines
1.2 KiB
TypeScript
55 lines
1.2 KiB
TypeScript
![]() |
import {Plugin, Cordova} from './plugin';
|
||
|
/**
|
||
|
* @name FileOpener
|
||
|
* @description
|
||
|
* This plugin will open a file on your device file system with its default application.
|
||
|
*
|
||
|
* @usage
|
||
|
* ```
|
||
|
* import {FileOpener} from 'ionic-native';
|
||
|
*
|
||
|
*
|
||
|
*
|
||
|
* ```
|
||
|
*/
|
||
|
@Plugin({
|
||
|
plugin: 'cordova-plugin-file-opener2',
|
||
|
pluginRef: 'cordova.plugins.fileOpener2',
|
||
|
repo: 'https://github.com/pwlin/cordova-plugin-file-opener2'
|
||
|
})
|
||
|
export class FileOpener {
|
||
|
/**
|
||
|
* Open an file
|
||
|
* @param filePath {string} File Path
|
||
|
* @param fileMIMEType {string} File MIME Type
|
||
|
*/
|
||
|
@Cordova({
|
||
|
callbackStyle: 'object',
|
||
|
successName: 'success',
|
||
|
errorName: 'error'
|
||
|
})
|
||
|
static open(filePath: string, fileMIMEType: string): Promise<any> {return; }
|
||
|
|
||
|
/**
|
||
|
* Uninstalls a package
|
||
|
* @param packageId {string} Package ID
|
||
|
*/
|
||
|
@Cordova({
|
||
|
callbackStyle: 'object',
|
||
|
successName: 'success',
|
||
|
errorName: 'error'
|
||
|
})
|
||
|
static uninstall(packageId: string): Promise<any> {return; }
|
||
|
|
||
|
/**
|
||
|
* Check if an app is already installed
|
||
|
* @param packageId {string} Package ID
|
||
|
*/
|
||
|
@Cordova({
|
||
|
callbackStyle: 'object',
|
||
|
successName: 'success',
|
||
|
errorName: 'error'
|
||
|
})
|
||
|
static appIsInstalled(packageId: string): Promise<any> {return; }
|
||
|
}
|