2016-09-01 05:02:15 +08:00
|
|
|
import { Plugin, Cordova } from './plugin';
|
2016-08-28 02:43:57 +08:00
|
|
|
/**
|
|
|
|
* @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({
|
2016-10-18 09:33:17 +08:00
|
|
|
name: 'FileOpener',
|
2016-08-28 02:43:57 +08:00
|
|
|
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; }
|
|
|
|
}
|