Giter Site home page Giter Site logo

Comments (7)

culoi avatar culoi commented on August 16, 2024

Hello @LoongerBuxus

Are you able to share code sample of your app or part of the code on how did you implement the return of the result?

Regards

from blinkid-react-native.

L00nger avatar L00nger commented on August 16, 2024

Hi @culoi,

I'm following the usage code you show in the readme, it's just a copy paste:

const scanningResult = await BlinkID.scan(...)

But scanningResult never gets a value, the promise never resolves or rejects. No error, no information.

As far as I have researched, the module starts the scan Intent:

currentActivity.startActivityForResult(scanIntent, REQ_CODE_SCAN);

But the ActivityEventListener never gets a result.

from blinkid-react-native.

L00nger avatar L00nger commented on August 16, 2024

I think this library is not compatible with Expo detached apps, so I eventually moved my app to a react-native init one and it worked smoothly.

from blinkid-react-native.

naartjie avatar naartjie commented on August 16, 2024

Expo detached apps

@LoongerBuxus you mean ejected Expo apps?

It used to be a problem [#34], but it should be working from version 1.4.2 now, see #34 (comment)

from blinkid-react-native.

L00nger avatar L00nger commented on August 16, 2024

@naartjie yes, in Expo terminology eject=detach.. but I can see that issue is in iOS platform, and mine is in Android, as onActivityResult is not being called with any result from ScanIntent.

I have tried to make my own native module and the patern startActivitForResult->onActivityResult is not working with detached Expo apps.

from blinkid-react-native.

naartjie avatar naartjie commented on August 16, 2024

@LoongerBuxus Ah sorry, my bad. That issue is not related at all.

I have tried to make my own native module and the patern startActivitForResult->onActivityResult is not working with detached Expo apps.

Hmm... This does sound strange, is it not something specific to your setup, rather than detached apps specifically - it seems like it would be a pretty major issue if it was the case.

from blinkid-react-native.

L00nger avatar L00nger commented on August 16, 2024

@naartjie I know other people is having the same problem, maybe there is a workaround for making native modules work in detached Expo apps in Android but I opted to recreate my app with rn init as I only had the Expo Camera dependency.

from blinkid-react-native.

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.