Giter VIP home page Giter VIP logo

Comments (7)

troelsh avatar troelsh commented on July 19, 2024 1

Just found this little thing - trying to built with that in main manifest file.

<uses-feature android:name="android.hardware.nfc" android:required="false" />

from react-native-nfc-manager.

whitedogg13 avatar whitedogg13 commented on July 19, 2024

Hi @troelsh , really thanks for spotting this issue!
I will modify the AndroidManifest.xml based on this soon~

from react-native-nfc-manager.

troelsh avatar troelsh commented on July 19, 2024

@whitedogg13 sounds great!

I will test it

from react-native-nfc-manager.

troelsh avatar troelsh commented on July 19, 2024

@whitedogg13 but this reversely will not work for app's that demands NFC functionality and only want NFC devices to see the app.

Maybe this setting should be removed from the modules manifest and added as an instruction on how to set it up in the main manifest file of the app?

from react-native-nfc-manager.

whitedogg13 avatar whitedogg13 commented on July 19, 2024

Hi, @troelsh thanks for the insight.

Regarding this topic, I think setting the requirement level to false is a fair option. The main reason for that is because NFC is used as a supplementary feature for most apps.

Ultimately I think how to set this flag depends on the nature of the library. For example, I have checked another project I have contribute to (react-native-ble-manager), and in that project the hardware requiremen has been set to true. I think that's because BLE is mostly used as a mandatory feature.

On the other hand, I think clarifying this point in documentation is definitely a good idea. Do you want to propose a PR for that? I'll be happy to merge it! :)

BTW, I have just added a small feature to detect NFC support by rejecting promise in NfcManager.start call in the latest version, this might affect your app if you're not handle promise rejection previously. Just for your reference.

Thanks!

from react-native-nfc-manager.

troelsh avatar troelsh commented on July 19, 2024

@whitedogg13 i tried my best to make a suitable description that explains this. See PR #17

I just found the "bug" i will let my dev colleague who has integrated your module know to handle promise rejections if he doesn't do that already. 👍

from react-native-nfc-manager.

whitedogg13 avatar whitedogg13 commented on July 19, 2024

We now have set default hardware permission to false and PR #17 merged. Thanks @troelsh

from react-native-nfc-manager.

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.