> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/sdk-provider/eventos/emitfinishqr.md).

# emitFinishQr

QR flow completion signal.

## Details

It is emitted when calling [stopQr](/docs.facephi-en/sdks/sdk-web/componentes/sdk-provider/metodos/stopqr.md) after finishing the QR flow on the mobile device.

**Event:** `emitFinishQr`

**Type:** `FacephiSdkProviderCustomEvent<FinishQr>` | `CustomEvent<FinishQr>`

### Syntax

```typescript
provider.addEventListener('emitFinishQr', onEmitFinishQr);
```

### Received object

```json
detail: {
  isDesktop: boolean
}
```

## Description

Allows the logic to continue when the capture on the mobile device has finished.

In a QR flow, the capture occurs on the mobile device; when your Integration calls [stopQr](/docs.facephi-en/sdks/sdk-web/componentes/sdk-provider/metodos/stopqr.md) (e.g. in the last `extractionFinish`), the event is emitted on **both** devices. Since the event is received on both, use `detail.isDesktop` to run your logic in the appropriate environment (e.g. only on desktop): `if (detail.isDesktop) { … }`.

### Considerations

* `emitFinishQr` it is only emitted by the `facephi-sdk-provider` due to the finish of the `QrWidget`; the `widgetFinish` of internal widgets via QR (Selphi/SelphID) **does not** emit it.

***

## Example

```jsx
<facephi-sdk-provider
    apikey={process.env.FACEPHI_SDK_APIKEY}
    qr={true}
    onEmitFinishQr={onEmitFinishQr}
/>
```

```typescript
// Call stopQr() when the capture has finished:
await provider.stopQr();

provider.addEventListener('emitFinishQr', (event) => {
  // It is emitted on both peers.
  if (event.detail.isDesktop) {
    continueOnDesktop(); // Continues the business flow.
  } else {
    showContinueOnDesktopView(); // Displays a custom notice screen.
  }
});
```
