react-native-nfc-manager | React Native NFC module for Android & iOS | iOS library
kandi X-RAY | react-native-nfc-manager Summary
kandi X-RAY | react-native-nfc-manager Summary
React Native NFC module for Android & iOS
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Performs a transceive operation on an rn array .
- enable the foreground dispatch
- Checks if the device supports MIFARE
- Converts a ReadableMap to a JSONObject .
- Serialize an NDEF object to JSON object .
- Converts a JSONArray to a Reactable array .
- Translate the String type to the NFVO
- Create native modules .
- Create view managers .
- Checks if the device is connected .
react-native-nfc-manager Key Features
react-native-nfc-manager Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-nfc-manager
QUESTION
I’m writing a React Native application which has to communicate with NFC MiFare Ultralight tags. I have NXP NTAG I2C PLUS ISO14443-3 tags.
I’m using the react-native-nfc-manager library for this. On android I didn’t notice any problems just on the iOS side. I’m testing on iOS 13 and 14 and my device is an iPhone 7.
I am able to find and connect to NFC Mifare Ultralight tags (can read and write them too), but in the 75% of the situations I get the following error during the communications:
ANSWER
Answered 2021-Feb-18 at 07:40At the end I managed to try out our app on multiple iPhones and the NFC worked properly. We also found out that our test device is a refurbished unit and we think that maybe that is the problem's cause.
QUESTION
Version 2 of react-native-nfc-manager is supposed to support disabling the scan sound (https://github.com/whitedogg13/react-native-nfc-manager/issues/60#issuecomment-464352677), however it doesn't seem to work.
This is the call:
...ANSWER
Answered 2020-Jul-11 at 22:38Update:
Impossible for ios, and supposed to work for android (it does work natively)
That undocumented Flag is very specific to the undocumented in this library Advanced Android Native direct enableReaderMode
API usage.
The iOS NFC API's and the basic older Android API's have no control over the sounds made by the platform on Tag detection.
Additional Android Specific
And looking at the code for Android https://github.com/whitedogg13/react-native-nfc-manager/blob/master/android/src/main/java/community/revteltech/nfc/NfcManager.java
The following seems to be reported to partially work (I note that it sets other advanced options that mean it probably would only detect a tag once every 10 seconds)
QUESTION
I am trying to emulate an NDEF message (NFC Forum Type 4 Tag) using ReactNative. I could not find any working source code or module to achieve this. The only working application is from Maxsoft.bg named NFC NDEF Tag Emulator which is not open source.
So far I've used react-native-nfc-manager
and react-native-nfc-hce
, but I couldn't make it work.
I also checked the android documentation but I couldn't find a working example/sourcecode there as well.
I found it really strange that I couldn't find even one working source code! So, it would be great if you could help me with a working ReactNative or Android source code.
...ANSWER
Answered 2020-Jul-13 at 20:09NDEF Message with HCE Android should provide you with the answer for Native Java for Android, the best answer also has linked a github repo with source code demo.
QUESTION
this is my very first post so please be gentle. I am mostly looking for Information that could lead me to a good library or a document that could help me out with what im trying to achieve. So far I tried using this library that I found on github to add nfc functionality to my app, which works great with cards and tags but I have no idea how to make it communicate with my pi reader.
Any help would be much appreciated. Thanks in advance!
...ANSWER
Answered 2020-Mar-26 at 22:12I don't know about React-Native library but you can access the underlying Android API's so here is a pointer using the Android API's
But some background first, normally in NFC there is a reading device and a NFC Card. The Reader initialise the NFC comms and the card responds. BUT there is the option of device to device (peer to peer) comms, this uses different underlying comm protocols than device to card
The right hand column of the image below describes it well
The Peer to Peer method is called Android Beam and unfortunately been depreciated in favour of Bluetooth/Wifi Direct and is not available in Android 10 and above.
Documentation for Android Beam is https://developer.android.com/guide/topics/connectivity/nfc/nfc#p2p
and
BUT
there is another more complicated option, it is possible for an Android Device to Emulate a NFC card, this is called Host Card Emulation (HCE), this is probably possible to do on the Raspberry Pi as well.
Therefore one device pretends to be a NFC Card and the other device reads/writes to it as a Card.
With HCE you can emulate a Standard Type 4 Tag and then read/write NDEF messages, the answer here https://stackoverflow.com/a/60813707/2373819 goes in to more detail about how to do this.
QUESTION
I recently upgraded (painfully) from react-native 0.59.10 to 0.61.2 and when I build and run thru Xcode 11 the splash screen loads but then errors show up in the console and the app doesn't load.
I've tried:
cd ios && rm -rf Pods && pod cache clean --all && pod install && cd ..
react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios
and done another clean install of react-native but to no avail.
package.json
...ANSWER
Answered 2019-Oct-16 at 21:43Fixed my issue. Was missing dependencies from the upgrade that didn't add to Podfile automatically. For reference, in my case it was:
QUESTION
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task
':app:transformClassesAndResourcesWithProguardForDebug'
.java.io.IOException: Can't write [/home/user/Desktop/pratap/react-projects/test/android/app/build/intermediates/transforms/proguard/debug/0.jar] (Can't read [/root/.gradle/caches/transforms-2/files-2.1/25cd9e2eed8b822cb2ad78849b3b28bf/jars/classes.jar(;;;;;;;**.class)] (Duplicate jar entry [android/support/v4/app/INotificationSideChannel$Stub$Proxy.class]))
I'm running react-native run-android
command to run the app and getting above error I don't know what's going on with java.io.IOException
I have tried:
- remove android > build folder and run again
- run cd android && gradlew clean and then cd .. && react-native run-android
- remove node_modules folder and reinstall it by npm install
GRADLE -
...ANSWER
Answered 2019-Jul-25 at 07:11You may try running 'jetifier' to migrate libraries to AndroidX if that is the case.(if there are native dependencies using AndroidX.)
- npm install --save-dev jetifier
- npx jetify
- npx react-native run-android
QUESTION
I am trying to read from a Bloodsugar Meter using NFC, right now on an Android, haven't tried iOS yet (don't have a phone with NFC).
I am using react-native-nfc-manager as library and the example that comes with it: https://github.com/whitedogg13/react-native-nfc-manager
I am receiving this tag:
...ANSWER
Answered 2019-Jan-14 at 10:16Since your tag does not contain Ndef
in its techTypes
list, it does not contain an NDEF message. Consequently, you won't be able to read any such message. As your "tag" is a blood sugar meter, I assume that it's not even expected to contain an NDEF message.
Instead, you will have to find out what commands the blood sugar meter actually supports (probably it will support the ISO/IEC 15693 READ SINGLE BLOCK command (see here). In order to send such low-level commands, you will need to use the Generic NfcTech API by requesting the tag technology:
QUESTION
I started getting this error when I run react-native run-android
.
What went wrong: Could not resolve all files for configuration ':app:debugCompileClasspath'.
Could not find play-services-basement.aar (com.google.android.gms:play-services-basement:15.0.1). Searched in the following locations: https://jcenter.bintray.com/com/google/android/gms/play-services-basement/15.0.1/play-services-basement-15.0.1.aar Could not find play-services-measurement-base.aar (com.google.android.gms:play-services-measurement-base:15.0.2).
Searched in the following locations: https://jcenter.bintray.com/com/google/android/gms/play-services-measurement-base/15.0.2/play-services-measurement-base-15.0.2.aar
- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
I'm kinda clueless about what to do, I tried adding
...ANSWER
Answered 2018-Oct-25 at 06:30Adding google() before jcenter() in bulild.gradle as mentioned in below site fixed my issue.
https://www.developerfaqs.com/4120/android-gradle-failed-to-resolve-play-services-basement
QUESTION
I am trying to setup code push to manage the release of my React Native app.
After setting up new buildTypes as per this guide(https://github.com/Microsoft/react-native-code-push/blob/master/docs/multi-deployment-testing-android.md) My project does not sync anymore and I get errors on all of my 3rd party libraries I have installed.
Unable to resolve dependency for ':app@releaseStaging/compileClasspath': Could not resolve project :react-native-camera.
...
and the same for some UnitTest that I guess Gradle added automatically
Unable to resolve dependency for
':app@releaseStagingUnitTest/compileClasspath': Could not resolve project :react-native-camera.
I could not find more information in MS Code Push and the example app does not have any 3rd party libraries to look for hints. What is causing this and how to solve this?
my app build.gradle is:
...ANSWER
Answered 2018-Oct-12 at 11:37Please update your android build.gradle file by using below code:
QUESTION
I'm using react native v0.49 and installed react-native-nfc-manager . when I try to use nfc I get the error
...ANSWER
Answered 2017-Dec-11 at 14:58Be careful, NFC
could not be available in all devices, so you have to check first:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-nfc-manager
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page