mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 00:12:53 +08:00
feat(FileOpener): add showOpenWithDialog function #3014
feat(FileOpener): Added method showOpenWithDialog
This commit is contained in:
commit
0dc320bbd2
@ -18,6 +18,10 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
* .then(() => console.log('File is opened'))
|
||||
* .catch(e => console.log('Error opening file', e));
|
||||
*
|
||||
* this.fileOpener.showOpenWithDialog('path/to/file.pdf', 'application/pdf')
|
||||
* .then(() => console.log('File is opened'))
|
||||
* .catch(e => console.log('Error opening file', e));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
@ -71,4 +75,19 @@ export class FileOpener extends IonicNativePlugin {
|
||||
appIsInstalled(packageId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens with system modal to open file with an already installed app.
|
||||
* @param {string} filePath File Path
|
||||
* @param {string} fileMIMEType File MIME Type
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackStyle: 'object',
|
||||
successName: 'success',
|
||||
errorName: 'error'
|
||||
})
|
||||
showOpenWithDialog(filePath: string, fileMIMEType: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user