> For the complete documentation index, see [llms.txt](https://docs.zipy.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zipy.ai/zipy-for-mobile/flutter-setup/session-recording-control.md).

# Session Recording Control

**Note: Use version `0.1.1` or above to use this functionality.**

### Overview

The session control functions allow you to manage when data is collected by the SDK. Whether you need to temporarily halt data capture or end a session entirely, the following functions provide the necessary control:

* **Pause:** Temporarily stop capturing events while keeping the session active.
* **Resume:** Continue event recording after a pause.
* **Stop:** End the current session and stop all event recording.
* **Start/Init:** Start a new session after stopping.

### Detailed Function Descriptions

1. **Pause:**&#x20;
   * Use this function when you need to momentarily stop data capture without ending the session.&#x20;

```dart
Zipy.pause();
```

2. Resume:&#x20;
   * Use this function to continue capturing events after a pause.
   * Note that it will  start a new session if the current one has already timed out ( i.e. paused for 30mins or whatever is configured).

```dart
Zipy.resume();
```

3. Stop:
   * When this function is called, the session ends and no further events are captured. To capture events again, you must initialise a new session.

```dart
Zipy.stop();
```

4. Start/Init:
   * Use this function with your API key to either start a new session.

```dart
Zipy.init(key: 'YOUR_API_KEY');
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.zipy.ai/zipy-for-mobile/flutter-setup/session-recording-control.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
