Rocket.Chat.ReactNative icon indicating copy to clipboard operation
Rocket.Chat.ReactNative copied to clipboard

Add react-native-pdf

Open pratyaksh123 opened this issue 4 years ago • 5 comments

Description:

The current behavior of downloading pdf files is a webview implementation, which can be improved if we use an app-inbuilt pdf viewer that also allows us to leverage local document cache ( something similar to this PR https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/2809) and also pdf-thumbnails which can be a good UX.

Steps to reproduce:

  1. Open a pdf file from messages.

Expected behavior:

Should open a pdf viewer baked into the app

Actual behavior:

on iOS: opens the pdf in a webview, on android: file starts downloading.

Additional context:

pratyaksh123 avatar Jan 22 '21 17:01 pratyaksh123

@pratyaksh123 Can I take this up? Thanks.

kbatavia12 avatar Mar 13 '21 12:03 kbatavia12

Yeah go ahead 👍

pratyaksh123 avatar Mar 13 '21 12:03 pratyaksh123

@pratyaksh123 Can you quickly guide me through it, I had a problem finding the source of the pdf file, can you tell me where to find it? Thanks.

kbatavia12 avatar Mar 13 '21 12:03 kbatavia12

@diegolmello @pratyaksh123 I keep getting the error "app:mergeExperimentalPlayDebugNativeLibs failed" when I add react-native-pdf to the project and then I cannot run it in debug mode. Can you please guide me on how to fix this error? Thanks in advance.

kbatavia12 avatar Mar 13 '21 18:03 kbatavia12

I have the same problem. The app downloads the file and sends me to the google store to download some reader. I believe it is a problem with the method of opening files from the rooms. Only happens on android. On iphone it works perfectly. Has anyone else encountered this same situation?

dudsdud avatar May 11 '22 18:05 dudsdud