> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/sdks/sdk-mobile/framework-plugins/flutter/componentes/nfc.md).

# NFC Capture

Its main processes are:

* Internal management of the NFC sensor.
* Permission management.
* Document analysis.
* Progress analysis.
* Assistant in the reading processes.
* Return all possible information to be read
* Return images when they are available for reading

## Dependencies <a href="#id-2-dependencia" id="id-2-dependencia"></a>

### Flutter:

```swift
dependencies:
  fphi_sdkmobile_nfc:
    hosted:
      name: fphi_sdkmobile_nfc
      url: https://facephicorp.jfrog.io/artifactory/api/pub/pub-pro-fphi/
    version: ^<version>
```

### Android - Gradle:

```kotlin
implementation "com.facephi.androidsdk:nfc_component:$version"
```

### iOS - CocoaPods:

```swift
s.dependency 'FPHISDKNFCComponent', '~> $version'
```

## Method startNfcComponent <a href="#id-4-lanzamiento-simplificado" id="id-4-lanzamiento-simplificado"></a>

Once the SDK has been initialized and a new operation has been created, the component can be launched. Any of its controllers can be used to execute its functionality.

Launching the NFC reader:

```dart
Future<Map> startNfcComponent({
  required NfcConfiguration widgetConfigurationJSON,
}) {
  return FphiSdkmobileNfcPlatform.instance.startNfcComponent(
      widgetConfigurationJSON: widgetConfigurationJSON
  );
}
```

## Basic configuration <a href="#id-5-configuracion-basica" id="id-5-configuracion-basica"></a>

To launch the current component, an object must be created ***NfcConfiguration*** which will be the configuration of the component controller.

The basic configuration required for it is as follows:

```dart
class NfcConfiguration
{
  NfcDocumentType mDocType;
  String mDocNumber;
  String mBirthDate;
  String mExpirationDate;
  int? mExtractionTimeout;
  bool? mShowDiagnostic;
  bool? mShowTutorial;
  bool? mShowPreviousTip;
  bool? mVibrationEnabled;
  bool? mDebug;
  bool? mSkipPACE;
  bool? mExtractFacialImage;
  bool? mExtractSignatureImage;
}
```

### Advanced component configuration

Below are all the fields that are part of this class.

{% content-ref url="/pages/da633eac0bce920270e2a99ecb8badeec0a2a580" %}
[NFC Configuration](/docs.facephi-en/sdks/sdk-mobile/framework-plugins/extras/nfc/nfc-configuracion.md)
{% endcontent-ref %}

## Receiving the result <a href="#id-6-recepcion-del-resultado" id="id-6-recepcion-del-resultado"></a>

The launch will return the information in ***NfcResult***. Being able to distinguish between a successful and an unsuccessful launch:

```dart
class NfcResult
{
  final SdkFinishStatus finishStatus;
  final String finishStatusDescription;
  final String errorDiagnostic;
  final String? errorMessage;
  final int timeoutStatus;
  final String facialImage;
  final String fingerprintImage;
  final String signatureImage;
  final dynamic nfcDocumentInformation;
  final dynamic nfcRawData;
  final dynamic nfcSecurityData;
  final dynamic nfcValidations;
  final dynamic nfcPersonalInformation;
}
```

Below are all the fields that are part of this class.

{% content-ref url="/pages/55ad7f803484789c3b0990695802a5b8609b4f38" %}
[NFC Result](/docs.facephi-en/sdks/sdk-mobile/framework-plugins/extras/nfc/nfc-resultado.md)
{% endcontent-ref %}
