Based on the discovery in https://github.com/department-of-veterans-affairs/va-mobile-app/issues/6913, we aren't using much of the functionality from the react-native-file-viewer package, and the functionality that we are using is only in a few parts of the app. This makes the package a good candidate for us to implement our own custom solution, rather than adding this package to the app just for one function. We're only using the open function from the package, so this functionality is the main thing that would be needed in the native module. One thing to note is we are using the onDismiss option in the secure messaging slice, so functionality for that would need to be migrated as well.
Acceptance criteria
[ ] Create a native module for previewing files
[ ] Replace instances of react-native-file-viewer with the native module
[ ] Remove the react-native-file-viewer package from the repo
Description
Based on the discovery in https://github.com/department-of-veterans-affairs/va-mobile-app/issues/6913, we aren't using much of the functionality from the react-native-file-viewer package, and the functionality that we are using is only in a few parts of the app. This makes the package a good candidate for us to implement our own custom solution, rather than adding this package to the app just for one function. We're only using the
open
function from the package, so this functionality is the main thing that would be needed in the native module. One thing to note is we are using the onDismiss option in the secure messaging slice, so functionality for that would need to be migrated as well.Acceptance criteria
react-native-file-viewer
with the native modulereact-native-file-viewer
package from the repo