# Pairing agent

Canonical page: https://docs.ovok.com/flutter-sdk/reference/ovok_flutter/pairing-agent

{/* Generated by scripts/generate_reference.dart; do not edit. */}

## AndroidPairingAgent [#androidpairingagent]

```dart
class AndroidPairingAgent implements BluetoothPairingAgent
```

Enters a device's fixed PIN when Android asks for it, through this package's Android plugin.

### Constructors [#constructors]

#### AndroidPairingAgent.new [#androidpairingagentnew]

```dart
AndroidPairingAgent()
```

Creates the agent; it talks to the plugin registered with the app.


## fixedPinOf [#fixedpinof]

```dart
String? fixedPinOf(String deviceKey)
```

The fixed PIN the device with `deviceKey` asks for when it pairs, or null when it asks none.

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `deviceKey` | `String` | positional |  |


## pinToEnter [#pintoenter]

```dart
String? pinToEnter(String deviceKey, {BluetoothPairingAgent? pairingAgent})
```

The PIN to show the user while the device with `deviceKey` pairs, because no agent enters it; null otherwise.

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `deviceKey` | `String` | positional |  |
| `pairingAgent` | `BluetoothPairingAgent?` | named |  |


## platformPairingAgent [#platformpairingagent]

```dart
BluetoothPairingAgent? platformPairingAgent()
```

The agent for this platform: Android lets an app enter a PIN, iOS leaves it to the user.
