# 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" %}

<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>  ensureSynced?: 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;
  bool? ensureSynced;
}
</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><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)                                                                                                                                                           |                                                                                                             |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.movesdk.com/move-platform/sdk/models/moveoptions/devicediscovery.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
