7

I have updated my Android's targetSdkVersion to 30, and I realized that the actionViewIntent function does not work on Android 11.

There is no error thrown. So I and not able to target the exact issue.

Below is my code:

RNFetchBlob.android.actionViewIntent(filePath, mimeType);

Has anyone else had this issue after updating? Please assist me!!

Thanks in advance.

Irfan wani
  • 4,084
  • 2
  • 19
  • 34
Rajkumar J
  • 161
  • 11
  • were you able to solve it? I am facing the same problem. – Yus Mar 08 '22 at 09:21
  • Yeah! Please see my solution for how I solved it! – Rajkumar J Mar 08 '22 at 14:14
  • Is this solution still working for you? It was working for me at one point but now on Android 11 only, doing this RNFetchBlob.android.actionViewIntent(filePath, mimeType) doesn't open the PDF anymore. Still works on Android 10 or 12 though. Very puzzling. – Ree Jul 08 '22 at 17:39

1 Answers1

7

I fixed this issue by adding "queries" in AndroidManifest.xml

<queries>
    <intent>
        <action android:name="android.intent.action.VIEW" />
        <data android:mimeType="*/*" />
    </intent>
</queries>

<application ....
Rajkumar J
  • 161
  • 11