From a393f00c13e3a50e5adcb6073d4c2c79d1f5edbc Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Fri, 31 Oct 2025 10:35:45 +0100 Subject: [PATCH 1/2] fix(android): couldn't find meta-data for provider --- .../com/reactnativedocumentviewer/RNDocumentViewerModule.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/document-viewer/android/src/main/java/com/reactnativedocumentviewer/RNDocumentViewerModule.kt b/packages/document-viewer/android/src/main/java/com/reactnativedocumentviewer/RNDocumentViewerModule.kt index 29f6d013..e486a221 100644 --- a/packages/document-viewer/android/src/main/java/com/reactnativedocumentviewer/RNDocumentViewerModule.kt +++ b/packages/document-viewer/android/src/main/java/com/reactnativedocumentviewer/RNDocumentViewerModule.kt @@ -62,8 +62,8 @@ class RNDocumentViewerModule(reactContext: ReactApplicationContext) : NativeDocu UriWithFlags(Uri.parse(bookmarkOrUri), flags) } else if (bookmarkOrUri.startsWith("file://")) { val uri = Uri.parse(bookmarkOrUri) - // TODO package name may not be the same as applicationId - val authority = reactApplicationContext.packageName + ".provider" + // TODO package name may not be the same as applicationId. Also see document-viewer/android/src/main/AndroidManifest.xml + val authority = reactApplicationContext.packageName + ".reactnativedocumentviewer.provider" val uriPath = uri.path ?: throw IllegalArgumentException("file:// uri must have a path") val fileUri = FileProvider.getUriForFile( reactApplicationContext, From 32bbd9b2c3f77c8a71224941631b90cac3b231fc Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Fri, 31 Oct 2025 11:10:23 +0100 Subject: [PATCH 2/2] Fix meta-data provider issue on Android Fixes an issue where the meta-data for the provider could not be found on Android. --- .changeset/wet-impalas-push.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/wet-impalas-push.md diff --git a/.changeset/wet-impalas-push.md b/.changeset/wet-impalas-push.md new file mode 100644 index 00000000..06d048b9 --- /dev/null +++ b/.changeset/wet-impalas-push.md @@ -0,0 +1,5 @@ +--- +"@react-native-documents/viewer": patch +--- + +fix(android): couldn't find meta-data for provider