How to send data between two phones using NFC in Flutter? - flutter

I am building a flutter where an app transfers user details from one phone to another. Initially I built this using a qr code scanner and generator setup.
Now I am trying to pass the data between the devices using NFC.
Could someone tell me how to send an NFC message from a device, and how to accept this message from another device?
I did read through github.com/matteocrippa/flutter-nfc-reader, and I understood how to read NFC data, but how can we send NFC data from a device?

I know this is an old question but I've encountered it and if someone is still searching - flutter_nfc_kit.
Yet another plugin to provide NFC functionality on Android and iOS.
This plugin's functionalities include:
read metadata and read & write NDEF records of tags / cards complying with:
ISO 14443 Type A & Type B (NFC-A / NFC-B / MIFARE Classic / MIFARE Plus / > MIFARE Ultralight / MIFARE DESFire)
ISO 18092 (NFC-F / FeliCa)
ISO 15963 (NFC-V)
transceive commands with tags / cards complying with:
ISO 7816 Smart Cards (layer 4, in APDUs)
other device-supported technologies (layer 3, in raw commands, Android only)
Note that due to API limitations not all operations are supported on both platforms.
This library uses ndef for NDEF record encoding & decoding.
Note: NDEF (NFC Data Exchange Format) is a light-weight binary format, used to encapsulate typed data. It is specified by the NFC Forum, for transmission and storage with NFC, however it is transport agnostic. (source: developer.android.com)

Related

NDEF Capability Container decoding with NTAG 5 boost

I am currently working on an I2C communication between an i.MX6 (Android BSP) and a NTAG 5 boost component.
NTA5532 datasheet says :
"According to NFC Forum Type 5 Tag Specification, EEPROM block 0 contains the Capability Container directly followed by the NDEF Message TLV."
In fact, below is the user memory orgnisation of the NTAG 5 boost:
So I used TagInfo NXP's app to read the memory of the NTAG 5 component.
Here is what I get concerning NDEF Capability Container using this app:
How can I decode this block as NXP does in its application?
Following what says this PDF from ST about NDEF management, "The CC manages the information of an NFC Forum T5T", so the structure of this Capability Container is mainly common to all NFC Forum tags.
For more information about how to interpret the CC, see the previous pdf.

Reading tag from Ionic NFC plugin gives different information than if I use reader

I am developing an Ionic 2+ application using the NFC plugin.
The issue I run into is how the tag is read differently by a simple USB reader and by the device. The tag IDs are different.
In Ionic I use:
this.nfc.bytesToHexString(event.tag.id)
It is read correctly and I log the result:
From USB reader I get:
On the left is the software for the RFID reader, and on the right are reads with different settings.
What I need is to get the same information for both, the USB reader and the NFC plugin. I don't care about the format.
The IDs that you read are the same except that your USB RFID reader seems to only reads 4 bytes of the 7 byte UID. Since your USB reader doesn't seem to support any other formats, you won't be able to infer the remaining 3 bytes from nowhere. However, you can easily chop off the last three bytes of the UID in your ionic application:
this.nfc.bytesToHexString(event.tag.id.slice(0, 4))
You would then get the same value as for format "8 no. in HEX reverse".

Windows 10 Mobile (UWP) NFC credit card reader

My name is Konstantin.
I have the following problem. I'm currently working on one very serious application for bank. This is Universal Windows Platform application but I'm targeting the Windows 10 Mobile. I wanna create an application, which will allow to read information from credit card (basic info that is available in every credit card: holder name, card number, expire date). Can I handle this without using HCE (Host Card Emulation) that is available with Windows 10 mobile preview. If it is, how can I do this?
And one more question, if I have to use HCE, can I use my Nokia Lumia 930 like a device for debugging. I read somewhere, that NL930 does not support HCE, but then why NL730/830 does?
P.S: Sorry for mistakes. English is not my native language :)
I think you are referring to NFC enterprise provisioner.
-Implement an NFC HCE (Host Card Emulation) tap+pay application
-Communicate with a smart card or NFC tag
you can refer to this blog: NFC Team Blog.
var taskBuilder = new BackgroundTaskBuilder();
taskBuilder.Name = bgTaskName;
taskBuilder.TaskEntryPoint = taskEntryPoint;
taskBuilder.SetTrigger(new SmartCardTrigger(SmartCardTriggerType.EmulatorHostApplicationActivated));
bgTask = taskBuilder.Register();

How to transmit a tv channels to the Internet/mobile app?

My partner is owner of a local channel tv and he wants an mobile app with the streaming of his tv channel. How could I start?
This is quite a complicated end to end system you require - one simple first question is whether his channel is already broadcast by an existing broadcaster over satellite etc? If so you may find they already have an OTT (internet based delivery) option.
Assuming not then you have several key components:
video source - i.e. the live stream from the channel
some sort of streaming server to convert the video source into the formats required to stream over the internet. Take a look at Wowza as an example of a paid solution of videoLAN as an open source solution.
the mobile app - this will be slightly easier if you just have to stream from one channel.
some sort of user registration and programme guide / search backend if required.
You may also require a DRM solution if you need to protect the content against unauthorised playback, copying etc.

How to check my NFC TAG ID (UID)?

It is possible to know others NFC TAG ID when we used to the APK & TAG each phones.
For example,
Phone A and B try to tag. Then Phone A can know Phone B's NFC TAG ID (4 Bytes - HEX).
But I wanna know how to know my NFC TAG ID on my phone. Not used other phones.
If you know any other information, please give me your advice on that.
A phone does not necessarily have a fixed anti-collision identifier ("NFC Tag ID", as you call it). For instance, it could have an anti-collision identifier, that is randomly allocated on every activation (e.g. external HF field is turned on, phone is turned on, etc.) It could also have one or even multiple immutable anti-collision identifiers (e.g. from one or more secure elements).
This depends on several factors:
Is a secure element attached to the NFC controller in that phone?
Is the NFC controller configured to expose an attached secure element to the outside world?
Is the phone in card emulation mode or in passive peer-to-peer mode (or in a combined anti-collision phase for both modes)?
Does the NFC controller expose exactly one card-emulating entity (e.g. a secure element or the host controller) directly to the outside world or does it combine one or more emulating entities using NFCEE routing?
Etc.
As you mention "APK" I'm guessing that you refer to the Android platfrom (though you refused to answer my question on that). On newer Android devices (particularly those that support Host-based Card Emulation) and on Android devices that do not use card emulation at all, the anti-collision identifier (UID) visible to the outside world is typically not static and changes either on every activation or on every reboot of the device (some exceptions seem to exist). Particularly, with NFC peer-to-peer mode, the standard mandates the use of a per-session random identifier. Thus, the UID would not be of much use in those typical cases.
In general, Android does not provide any API to retrive the currently used anti-collision identifier from within the device. Usually, the random identifier is created within the NFC controller, so the Android system would not even know about it.
With regard to immutable IDs of secure element chips, vanilla Android does not contain public API to access secure elements, so the same applies to any identifing information of such secure elements.