open-index/open-npm huggingface dataset:
npm package: @idpass/hotspot-file-transfer-capacitor
Description: Capacitor plugin for the SmartScanner Core library to scan MRZ, NFC and barcodes
Author: NewLogic
Latest version: 1.0.2

# SmartScanner Capacitor

Capacitor plugin for [Hotspot File Transfer](https://github.com/newlogic/hotspot-file-transfer).

## Installation

This plugin can be installed from NPM:

```bash
# Using npm
npm install @idpass/hotspot-file-transfer-capacitor

# Using yarn
yarn add @idpass/hotspot-file-transfer-capacitor
```

## Usage

The plugin can be used by accessing LocalHotspotFileTransferPlugin from @idpass/hotspot-file-transfer-capacitor directly.

```js
import { FileTransfer } from '@idpass/hotspot-file-transfer-capacitor';

```

Sender example:

```js
const result = await LocalHotspotFileTransferPlugin.executeFileTransfer({
  role: 'SENDER', 
  theme_color: '#2196F3',
  directory_path: '{path of the directory you want to transfer}'
});

```

Receiver example:

```js
const result = await LocalHotspotFileTransferPlugin.executeFileTransfer({
  role: 'RECEIVER', 
  theme_color: '#2196F3',
});

```