> For the complete documentation index, see [llms.txt](https://docs.movesdk.com/move-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.movesdk.com/move-platform/sdk/models/moveoptions/devicediscovery.md).

# DeviceDiscovery

{% hint style="info" %}
Since MOVE SDK v2.4
{% endhint %}

{% hint style="warning" %}
Please note that MoveDevices can only be registered if the SDK has been configured with .setup()
{% endhint %}

{% tabs %}
{% tab title="Android" %}

```kotlin
data class DeviceDiscovery(
    val startDelay: Long?,
    val duration: Long?,
    val interval: Long?,
    val stopScanOnFirstDiscovered: Boolean = false,
    val ensureSynced: Boolean = false,
)
```

{% endtab %}

{% tab title="iOS" %}

```swift
public struct DeviceDiscovery {
    public var startDelay: TimeInterval = 120
    public var interval: TimeInterval = 300
    public var duration: TimeInterval = 10
    public var stopScanOnFirstDiscovered: Bool = false
    public var ensureSynced: Bool = false
}
```

{% endtab %}

{% tab title="React Native" %}

```tsx
export type MoveSdkDeviceDiscovery = {
  startDelay?: number;
  duration?: number;
  interval?: number;
  stopScanOnFirstDiscovered?: boolean;
  ensureSynced?: boolean;
};
```

{% endtab %}

{% tab title="Flutter" %}

```dart
import 'package:movesdk/io/dolphin/move/device_discovery_options.dart';
```

```dart
class DeviceDiscoveryOptions {
  int? startDelay;
  int? duration;
  int? interval;
  bool? stopScanOnFirstDiscovered;
  bool? ensureSynced;
}

final options = MoveOptions(
  deviceDiscovery: DeviceDiscoveryOptions(
    startDelay: 120,
    duration: 10,
    interval: 300,
    stopScanOnFirstDiscovered: false,
    ensureSynced: false,
  ),
);
```

{% endtab %}
{% endtabs %}

<table data-header-hidden><thead><tr><th width="265.3333333333333"></th><th width="108"></th><th width="90"></th><th></th></tr></thead><tbody><tr><td><strong>DeviceDiscovery</strong></td><td><strong>Type</strong></td><td><strong>Default</strong></td><td></td></tr><tr><td>startDelay</td><td>Number</td><td>120</td><td>Device discovery delay from start of the trip in seconds. If <code>null</code>, the default value is used.</td></tr><tr><td>duration</td><td>Number</td><td>10</td><td>Device discovery scan duration in seconds. If <code>null</code>, the default value is used.</td></tr><tr><td>interval</td><td>Number</td><td>300</td><td>Device discovery repeat interval in seconds. If <code>null</code>, the default value is used.</td></tr><tr><td>stopScanOnFirstDiscovered</td><td>Boolean</td><td>false</td><td>Stop detection on first device discovered.</td></tr><tr><td>ensureSynced</td><td>Boolean</td><td>false</td><td><p><em><strong>since MOVE SDK 2.17.0</strong></em></p><p>If set to true devices which fail synchronisation with the backend will automatically be unregistered. See <em>state</em> in <a href="/pages/XOoLu5IAWBkzdpIhtusd">MoveDeviceState</a>.</p></td></tr></tbody></table>

| **DeviceDiscovery related**                                                                                                                                                                                       |                                                                                                             |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `.setup(..., options:...)`                                                                                                                                                                                        | During setup it is possible to add DeviceDiscovery options to the MOVE SDK.                                 |
| Device Discovery Listener ([Android](/move-platform/sdk/api-interface/android/services.md#set-device-discovery-listener) / [iOS](/move-platform/sdk/api-interface/ios/services.md#set-device-discovery-listener)) | Fired when previous registered [MoveDevice](/move-platform/sdk/models/movedevice.md#android)'s are scanned. |
| [MoveOptions](/move-platform/sdk/models/moveoptions.md)                                                                                                                                                           |                                                                                                             |
