# Secure Capture — Real-Time, On-Device, No Storage

**Purpose**  
Analyze frames from the front-facing camera entirely **on device** to enhance fraud detection—**no images are stored or transmitted; only metadata/results are sent**.

**How it works**

- App decides when to activate (e.g., after login, during a transfer, or only in high-risk flows).
- `startCapture()` checks camera permission and begins periodic frame analysis locally.
- Frames are processed on device; images are **deleted immediately** after analysis.
- Only analysis results/metadata are sent to your backend.
- Capture ends when the app calls stopCapture().

**Required permission (AndroidManifest.xml)**

```
<uses-permission android:name="android.permission.CAMERA"/>

```

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2">  
</div></div></div>**SDK methods &amp; returns**

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-startcapture%28%29-%E2%86%92-suc"><div class="overflow-y-auto p-4" dir="ltr">- `startCapture()` → `SUCCESS` | `MISSING_PERMISSIONS`
- `stopCapture()` → `SUCCESS`

</div></div>**Usage example (Kotlin)**

```kotlin
val result = collectorAgent.startCapture()
if (result == "MISSING_PERMISSIONS") {
    // Request CAMERA permission before retrying
}
// ... perform secured flow ...
collectorAgent.stopCapture()

```

**UI guidance (pre-permission message)}**

> “To enhance security, the app will analyze images from your device’s front-facing camera. No images are stored or uploaded.”

**Security &amp; privacy notes**

- No images ever leave the device; only minimal metadata/results are transmitted.
- Immediate buffer deletion after analysis; follow data minimization best practices.

**Common scenarios**

- Post-login environment validation
- Extra check during standard transfers
- High-risk events (new payee, unusually large amount)

**Next steps**

1. Add CAMERA permission.
2. Explain purpose to users.
3. Integrate startCapture()/stopCapture() in the chosen flow(s).
4. Handle permission gracefully. 5) Roll out gradually and monitor analytics.

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--2"><div class="overflow-y-auto p-4" dir="ltr">  
</div></div>