mirror of
https://gitee.com/shuto/cordova-plugin-file-opener2.git
synced 2025-01-31 12:02:49 +08:00
showOpenWithDialog on Android
This commit is contained in:
parent
bc350a47fd
commit
6b34b93af4
25
README.md
25
README.md
@ -54,6 +54,21 @@ Open a PDF document with the default PDF reader and optional callback object:
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Open a system modal to open PDF document with one of the already installed app and optional callback object:
|
||||||
|
|
||||||
|
cordova.plugins.fileOpener2.showOpenWithDialog(
|
||||||
|
'/sdcard/Download/starwars.pdf', // You can also use a Cordova-style file uri: cdvfile://localhost/persistent/Download/starwars.pdf
|
||||||
|
'application/pdf',
|
||||||
|
{
|
||||||
|
error : function(e) {
|
||||||
|
console.log('Error status: ' + e.status + ' - Error message: ' + e.message);
|
||||||
|
},
|
||||||
|
success : function () {
|
||||||
|
console.log('file opened successfully');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
------
|
------
|
||||||
|
|
||||||
@ -64,16 +79,6 @@ Notes
|
|||||||
|
|
||||||
- If you are wondering what MIME-type should you pass as the second argument to `open` function, [here is a list of all known MIME-types](http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=co)
|
- If you are wondering what MIME-type should you pass as the second argument to `open` function, [here is a list of all known MIME-types](http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=co)
|
||||||
|
|
||||||
Additional iOS Functions
|
|
||||||
---
|
|
||||||
The following functions are available in iOS platform:
|
|
||||||
|
|
||||||
`.showOpenWithDialog(fileName, contentType, callbackContext)`
|
|
||||||
---
|
|
||||||
Same as `open` function, but this will show openWith dialog on iOS for sending files into another apps.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Additional Android Functions
|
Additional Android Functions
|
||||||
---
|
---
|
||||||
The following functions are available in Android platform:
|
The following functions are available in Android platform:
|
||||||
|
Loading…
Reference in New Issue
Block a user