mirror of
https://gitee.com/shuto/cordova-plugin-file-opener2.git
synced 2025-01-31 03:52:51 +08:00
docs: documented SD card limitation for android
This commit is contained in:
parent
70aa95bf1c
commit
cddc61214c
12
README.md
12
README.md
@ -51,7 +51,7 @@ Open an APK install dialog:
|
||||
|
||||
```javascript
|
||||
cordova.plugins.fileOpener2.open(
|
||||
'/sdcard/Download/gmail.apk',
|
||||
'/Downloads/gmail.apk',
|
||||
'application/vnd.android.package-archive'
|
||||
);
|
||||
```
|
||||
@ -60,7 +60,7 @@ Open a PDF document with the default PDF reader and optional callback object:
|
||||
|
||||
```js
|
||||
cordova.plugins.fileOpener2.open(
|
||||
'/sdcard/Download/starwars.pdf', // You can also use a Cordova-style file uri: cdvfile://localhost/persistent/Download/starwars.pdf
|
||||
'/Download/starwars.pdf', // You can also use a Cordova-style file uri: cdvfile://localhost/persistent/Downloads/starwars.pdf
|
||||
'application/pdf',
|
||||
{
|
||||
error : function(e) {
|
||||
@ -99,7 +99,7 @@ Opens with system modal to open file with an already installed app.
|
||||
|
||||
```js
|
||||
cordova.plugins.fileOpener2.showOpenWithDialog(
|
||||
'/sdcard/Download/starwars.pdf', // You can also use a Cordova-style file uri: cdvfile://localhost/persistent/Download/starwars.pdf
|
||||
'/Downloads/starwars.pdf', // You can also use a Cordova-style file uri: cdvfile://localhost/persistent/Downloads/starwars.pdf
|
||||
'application/pdf',
|
||||
{
|
||||
error : function(e) {
|
||||
@ -170,6 +170,12 @@ The following limitations apply when opening an APK file for installation:
|
||||
|
||||
---
|
||||
|
||||
## SD card limitation on Android
|
||||
|
||||
It is not always possible to open a file from the SD Card using this plugin on Android. This is because the underlying Android library used [does not support serving files from secondary external storage devices](https://stackoverflow.com/questions/40318116/fileprovider-and-secondary-external-storage). Whether or not your the SD card is treated as a secondary external device depends on your particular phone's set up.
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
|
||||
- For properly opening _any_ file, you must already have a suitable reader for that particular file type installed on your device. Otherwise this will not work.
|
||||
|
Loading…
Reference in New Issue
Block a user