# 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,
)
```

{% 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
}
```

{% endtab %}

{% tab title="React Native" %}

<pre class="language-tsx"><code class="lang-tsx"><strong>export type MoveSdkDeviceDiscovery = {
</strong><strong>  startDelay?: number;
</strong><strong>  duration?: number;
</strong><strong>  interval?: number;
</strong><strong>  stopScanOnFirstDiscovered?: boolean;
</strong><strong>};
</strong></code></pre>

{% endtab %}

{% tab title="Flutter" %}

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

<pre class="language-dart"><code class="lang-dart">class DeviceDiscoveryOptions {
<strong>  int? startDelay;
</strong>  int? duration;
  int? interval;
  bool? stopScanOnFirstDiscovered;
}
</code></pre>

{% 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.</td></tr><tr><td>duration</td><td>Number</td><td>10</td><td>Device discovery scan duration.</td></tr><tr><td>interval</td><td>Number</td><td>300</td><td>Device discovery repeat interval.</td></tr><tr><td>stopScanOnFirstDiscovered</td><td>Boolean</td><td>false</td><td>Stop detection on first device discovered.</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](https://docs.movesdk.com/move-platform/api-interface/android/services#set-device-discovery-listener) / [iOS](https://docs.movesdk.com/move-platform/api-interface/ios/services#set-device-discovery-listener)) | Fired when previous registered [MoveDevice](https://docs.movesdk.com/move-platform/sdk/movedevice#android)'s are scanned. |
| [MoveOptions](https://docs.movesdk.com/move-platform/sdk/models/moveoptions)                                                                                                                                                                        |                                                                                                                           |
