Skip to content

Commit 63d5c21

Browse files
authored
fix(android): couldn't find meta-data for provider (#879)
* fix(android): couldn't find meta-data for provider * Fix meta-data provider issue on Android Fixes an issue where the meta-data for the provider could not be found on Android.
1 parent c6de31b commit 63d5c21

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/wet-impalas-push.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@react-native-documents/viewer": patch
3+
---
4+
5+
fix(android): couldn't find meta-data for provider

packages/document-viewer/android/src/main/java/com/reactnativedocumentviewer/RNDocumentViewerModule.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class RNDocumentViewerModule(reactContext: ReactApplicationContext) : NativeDocu
6262
UriWithFlags(Uri.parse(bookmarkOrUri), flags)
6363
} else if (bookmarkOrUri.startsWith("file://")) {
6464
val uri = Uri.parse(bookmarkOrUri)
65-
// TODO package name may not be the same as applicationId
66-
val authority = reactApplicationContext.packageName + ".provider"
65+
// TODO package name may not be the same as applicationId. Also see document-viewer/android/src/main/AndroidManifest.xml
66+
val authority = reactApplicationContext.packageName + ".reactnativedocumentviewer.provider"
6767
val uriPath = uri.path ?: throw IllegalArgumentException("file:// uri must have a path")
6868
val fileUri = FileProvider.getUriForFile(
6969
reactApplicationContext,

0 commit comments

Comments
 (0)