# Showing Luciq

By default, Luciq is shown when the device is shaken (if you passed `InvocationEvents.Shake` in `LuciqConfiguration`). You can use other invocation events, show the SDK manually, or open a specific report type (bug, feedback, question) directly.

### Invocation events

Configure how the SDK is invoked using the `InvocationEvents` enum. You can set one or more events in `LuciqConfiguration` or at runtime with `BugReportingKmp.setInvocationEvents`.

Available events:

| Event                                  | Description                              |
| -------------------------------------- | ---------------------------------------- |
| `InvocationEvents.Shake`               | Shake the device to invoke bug reporting |
| `InvocationEvents.Screenshot`          | Take a screenshot to invoke              |
| `InvocationEvents.TwoFingersSwipeLeft` | Swipe left with two fingers              |
| `InvocationEvents.FloatingButton`      | Show a floating button above your UI     |
| `InvocationEvents.None`                | No automatic invocation (manual only)    |

{% code title="Kotlin" %}

```kotlin
BugReportingKmp.setInvocationEvents(listOf(InvocationEvents.Shake, InvocationEvents.FloatingButton))
```

{% endcode %}

### Floating button

If you use `InvocationEvents.FloatingButton`, you can set the edge and offset:

{% code title="Kotlin" %}

```kotlin
BugReportingKmp.setFloatingButtonEdge(FloatingButtonEdge.Right, offset = 50)
```

{% endcode %}

You can also set the position of the video recording floating button:

{% code title="Kotlin" %}

```kotlin
BugReportingKmp.setVideoRecordingFloatingButtonPosition(VideoRecordingButtonPosition.BottomRight)
```

{% endcode %}

### Shaking threshold

When using shake as an invocation event, you can adjust sensitivity. Higher values mean less sensitivity:

{% code title="Kotlin" %}

```kotlin
// iOS
BugReportingKmp.setShakingThresholdForiPhone(3.0)
BugReportingKmp.setShakingThresholdForiPad(1.0)
// Android
BugReportingKmp.setShakingThresholdForAndroid(800)
```

{% endcode %}

### Manual showing

To show the SDK manually (e.g. from a button or gesture), use `LuciqKmp.show()`:

{% code title="Kotlin" %}

```kotlin
LuciqKmp.show()
```

{% endcode %}

Use `InvocationEvents.None` if you only want manual invocation and no automatic triggers.

### Showing a specific report type

Instead of showing the prompt-options menu, you can open the bug, feedback, or question form directly. Pass the report type and optional invocation options:

{% code title="Kotlin" %}

```kotlin
// Show bug form
BugReportingKmp.show(ReportType.Bug, listOf(InvocationOptions.CommentFieldRequired))

// Show feedback form
BugReportingKmp.show(ReportType.Feedback, listOf(InvocationOptions.EmailFieldOptional))

// Show question form
BugReportingKmp.show(ReportType.Question, listOf(InvocationOptions.EmailFieldOptional))
```

{% endcode %}

`InvocationOptions` can include: `CommentFieldRequired`, `DisablePostSendingDialog`, `EmailFieldHidden`, `EmailFieldOptional`.

### Report types

Control which report types appear in the prompt (when you are not using `BugReportingKmp.show` with a specific type):

{% code title="Kotlin" %}

```kotlin
BugReportingKmp.setReportTypes(listOf(ReportType.Bug, ReportType.Feedback, ReportType.Question, ReportType.Other))
```

{% endcode %}

### Enable/disable Luciq

To disable or enable the entire SDK (e.g. for user opt-out):

{% code title="Kotlin" %}

```kotlin
LuciqKmp.setEnabled(true)   // enabled
LuciqKmp.setEnabled(false)  // disabled
```

{% endcode %}

{% hint style="warning" %}
When Luciq is disabled, all user data and attributes are removed from the device. Answered surveys are kept so they are not shown again when Luciq is re-enabled. User attributes cannot be set while disabled.
{% endhint %}
