You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-22Lines changed: 21 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ This library requires React Native 0.76.3 or newer. It is compatible with Expo S
17
17
npx expo install react-native-file-viewer-turbo
18
18
```
19
19
20
-
Add plugin to your `app.json` or `app.config.js` (it will modify AndroidManifest.xml as described below in extra step for Android section):
20
+
Add plugin to your `app.json` or `app.config.js`with preferred `mimeTypes`(it will modify AndroidManifest.xml as described below in extra step for Android section):
21
21
22
22
```json
23
23
{
@@ -26,7 +26,7 @@ Add plugin to your `app.json` or `app.config.js` (it will modify AndroidManifest
26
26
"react-native-file-viewer-turbo",
27
27
{
28
28
"mimeTypes": [
29
-
"*/*"// or any other mimeType you want to specifically include
29
+
"*/*"
30
30
]
31
31
}
32
32
]
@@ -69,6 +69,25 @@ For example, if you know upfront that your app is supposed to open PDF files, th
|**filepath**| string | The absolute path where the file is stored. The file needs to have a valid extension to be successfully detected. Use [expo-file-system constants](https://docs.expo.dev/versions/latest/sdk/filesystem/#constants) to determine the absolute path correctly. |
79
+
|**options** (optional) | Object | Some options to customize the behaviour. See below. |
|**onDismiss** (optional) | function | iOS, Android | Callback invoked when the viewer is being dismissed |
88
+
|**showOpenWithDialog** (optional) | boolean | Android | If there is more than one app that can open the file, show an _Open With_ dialogue box |
89
+
|**showAppsSuggestions** (optional) | boolean | Android | If there is not an installed app that can open the file, open the Play Store with suggested apps |
90
+
72
91
**IMPORTANT**: Try to be as granular as possible when defining your own queries. This might affect your Play Store approval, as mentioned in [Package visibility filtering on Android](https://developer.android.com/training/package-visibility).
73
92
74
93
> If you publish your app on Google Play, your app's use of this permission is subject to approval based on an upcoming policy.
| **filepath** | string | The absolute path where the file is stored. The file needs to have a valid extension to be successfully detected. Use [expo-file-system constants](https://docs.expo.dev/versions/latest/sdk/filesystem/#constants) to determine the absolute path correctly. |
201
-
| **options** (optional) | Object | Some options to customize the behaviour. See below. |
| **displayName** (optional) | string | Customize the QuickLook title (iOS only). |
208
-
| **onDismiss** (optional) | function | Callback invoked when the viewer is being dismissed (iOS and Android only). |
209
-
| **showOpenWithDialog** (optional) | boolean | If there is more than one app that can open the file, show an _Open With_ dialogue box (Android only). |
210
-
| **showAppsSuggestions** (optional) | boolean | If there is not an installed app that can open the file, open the Play Store with suggested apps (Android only). |
211
-
212
-
213
-
214
213
## Contributing
215
214
216
215
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
0 commit comments