# Multi-Instance detection \[Android devices only]

Multi-instance refers to the ability to launch multiple instances of the same application—either intentionally (such as through app cloning or multi-user modes) or unintentionally (due to a malicious attack or system bug). Each instance may run in a separate process, which can lead to security, privacy, or data consistency issues—especially in sensitive applications like finance, messaging, or enterprise tools.

Currently, detection of multi-instance using [Parallel Space](https://play.google.com/store/apps/details?id=com.lbe.parallel.intl\&hl=en) is supported.

Below are code snippets demonstrating passcode detection across various platforms:

```dart
// Android multi instance check
override fun onMultiInstanceDetected() {
    TODO("Not yet implemented")
}

// Flutter multi instance detection
onMultiInstance: () => print("Multi instance detected")

// Cordova multi instance detection
multiInstance: () => {
    // Place your reaction here
}

// React Native multi instance detection
multiInstance: () => {
    // Place your reaction here
}

// Capacitor multi instance detection
multiInstance: () => {
    // Place your reaction here
}
```

{% hint style="info" %}
**Recommended action:** Log the event on your BE and optionally react to it.
{% endhint %}

### Read More <a href="#read-more" id="read-more"></a>

What is multi-instacing, why is it an issue and how to detect it?

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>Introducing Multi-Instancing Detection for freeRASP</td><td><a href="https://3557356308-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQ2PxZTOjhquOxcxftTrm%2Fuploads%2FeP9FWzKmOs3mK0XG3Pf8%2Fimage.png?alt=media&#x26;token=972d84a1-4f5e-4179-af18-991fc05b72ce">image.png</a></td><td><a href="https://app.gitbook.com/s/NjTFXsqCLQ3RU2oA2uHC/articles/introducing-multi-instancing-detection-for-freerasp">Introducing Multi-Instancing Detection for freeRASP</a></td></tr></tbody></table>
