GithubHelp home page GithubHelp logo

nfc-react-native's People

Contributors

lube avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nfc-react-native's Issues

Changes needed for gradle 3.0.1 compatibility

Some minor changes are needed for gradle 3.0.1 compatibility: in android/build.gradle:

We are currently hacking these changes with a script in status.im, and would rather it is fixed upstream. Thanks!

Parent issue: status-im/status-mobile#3037

onTagWrite event not triggers

Hello,
Thank you for this great module. Please help me to figure out how should be triggered "onTagWrite event"? I setup nfc-react-native module, add code from "Usage" sectoion and run application on nexus 5 via Android studio. When I tap "Write sectors of a Tag" on device, onTagWrite event not triggers, also I have no any activity in AndroidStudio.

IOException and can not reading a tag continuously

Hello,friend.

I run your sample code and when I read a nfc tag,it gives me a java io exception error sometimes.when it success it return a minus tag id (F.E. -1037655583) which is not same as its real id. What's more ,the tag can only be read once unless I exit the scan page and enter again.
Do you have any idea of how it happened and how to solve this ? Thanks.

PS: Android Version - 5.1 :D.

NfcReactNativePackage Method does not override or implement a method from a supertype

Looks like there currently is an error during compile:

node_modules/nfc-react-native/android/src/main/java/es/tiarg/nfcreactnative/NfcReactNativePackage.java:33: error: method does not override or implement a method from a supertype
    @Override
    ^
1 error
:nfc-react-native:compileReleaseJavaWithJavac FAILED

From what I can tell there is a breaking change in react-native 0.47 where you need to remove the @OverRide statement at

    @Override
    public List<Class<? extends JavaScriptModule>> createJSModules() {
        return Collections.emptyList();
    }

How does the Example Work

Hi,

I have a question with regards to the example application.

I have it installed on both devices. I'm assuming, if I put them both back-to-back, that when I press write sectors of tag, that the other should automatically detect this and display an alert?

The reason I ask is I'm not receiving any alerts...

Thanks!

API Discussion

Use this issue for all API related problems or discussions.

Attempt to invoke virtual method 'boolean android.nfc.Tag.hasTech(int)' on a null object reference get MifareClassic.java:136

Curious if anyone else is receiving this error, or if it's something that is wrong with my Android build.

Attempt to invoke virtual method 'boolean android.nfc.Tag.hasTech(int)' on a null object reference
get
    MifareClassic.java:136
handleIntent
    NfcReactNativeModule.java:231
onNewIntent
    NfcReactNativeModule.java:248
onNewIntent
    ReactContext.java:197
onNewIntent
    ReactInstanceManager.java:522
onNewIntent
    NavigationReactGateway.java:79
fakeOnNewIntentForLinkingModule
    IntentDataHandler.java:48
onPostResume
    IntentDataHandler.java:32
onResume
    NavigationActivity.java:123
callActivityOnResume
    Instrumentation.java:1269
performResume
    Activity.java:6766
performResumeActivity
    ActivityThread.java:3377
handleResumeActivity
    ActivityThread.java:3440
handleLaunchActivity
    ActivityThread.java:2713
-wrap12
    ActivityThread.java
handleMessage
    ActivityThread.java:1460
dispatchMessage
    Handler.java:102
loop
    Looper.java:154
main
    ActivityThread.java:6077
invoke
    Method.java
run
    ZygoteInit.java:866
main
    ZygoteInit.java:756

MifareUltralight

Hi,
first of all thanks for this great library. My question is, if there is a possibility to support MifareUltralight NFC tags. What do you think? Best regards, Chris

Not receiving onTagDetected on Android 4.4

This library is working perfectly for me for reading tags on Android 5.x+, but I am not receiving the event on Android 4.4. I am not getting an exception at any point, or any other indication of something going wrong. The device on which I am testing will chime when an NFC tag is read, but I'm not even getting the chime with my app. I'm using the recommended settings for my manifest on React Native 40.0.

Below is a snippet of what I'm doing. emitter is an event emitter in my app that I use to publish various factors for identification.

function convertIntToHexId(tagInteger) {
  return tagInteger.toString(16).replace(/(.{2})(?!$)/g, "$1:");
}

getTagId();

DeviceEventEmitter.addListener('onTagDetected', (e) => {
  emitter.emit('factorReceived', {factorType: 'nfc', key: convertIntToHexId(e.id)});
});

"Operación cancelada" when pressing button for getCardId() call

I'm trying to test this module in an RN app we're working on. I have no idea how to implement a dynamic event so it detects the card when it is approached. Regardless, I'm trying to force it by binding it to the onPress event of a button we have. This is the specific commit I've made (and by extension, you can check the repo of the app): ebenezer-unitec/ReactNativeSBO@2f430c3

Any help, direction as to how the function should be implemented would be greatly appreciated.

Y también podemos continuar esto en españo, si llega a ser más fácil para ambos, jaja.

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.