# Enable or Disable Fragment Capture

> 🚧 Capturing Fragments
>
> Luciq does not capture fragments by default. In order to start capturing them, you'll need to follow the instructions mentioned [here](https://docs.luciq.ai/android/set-up-luciq-for-android/set-up-application-performance-monitoring/instrumentation-for-android).

If your app is set up to capture fragments with Luciq, you can enable or disable this feature by using the API below, passing a `Boolean` variable to it:

{% tabs fullWidth="true" %}
{% tab title="And - Java" %}

```java
//Enable
APM.setFragmentSpansEnabled(true)
//Disble
APM.setFragmentSpansEnabled(false)
```

{% endtab %}

{% tab title="And - Kotlin" %}

```kotlin
//Enable
APM.setFragmentSpansEnabled(true)
//Disble
APM.setFragmentSpansEnabled(false)
```

{% endtab %}
{% endtabs %}


---

# 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.luciq.ai/references/application-performance-monitoring/enable-or-disable-fragments.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.
