Code Monkey home page Code Monkey logo

Comments (4)

Noitham avatar Noitham commented on July 20, 2024 3

Issue solved!

Adding:

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

on the AndroidManifest.xml file fixed it for me 👍

from react-native-blob-util.

RonRadtke avatar RonRadtke commented on July 20, 2024

actionViewIntent is in general still working, also with pdf. Using it in production myself.

You're using the old library? This one did not trigger a promise rejection if no app to open the pdf is installed. React-native-blob-util will reject the promise and thus give you some information.

The reason I'm writing this is, that I had the same behavior you're describing on devices which didn't have a proper app to open the file type I wanted to open. So please check if you have any app installed that can open a pdf. (Not just open but react on actionviewintent, so basically opens if you click on a pdf in e.g. a file manager)

from react-native-blob-util.

Noitham avatar Noitham commented on July 20, 2024

Thanks for the quick response @RonRadtke.
I've made sure of it, and yes, I'm making use of the latest version (0.13.5) of the react-native-blob-util library.

Yesterday I tested on an emulator, so the option of not having an app could be there, but today I've been able to test it on an Android 11 device which has PDF apps and where we're able to open the PDF if we access it from a file manager.

The result is no feedback other than null is provided when logging the
await ReactNativeBlobUtil.android.actionViewIntent(filePath, `application/pdf`) function.

from react-native-blob-util.

RonRadtke avatar RonRadtke commented on July 20, 2024

Glad to hear. Then I close the issue here

from react-native-blob-util.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.