# Understanding App Process

## How App works

*<mark style="color:purple;">**TL;DR**</mark>* The app connects to [Discord's Gateway](https://discord.com/developers/docs/topics/gateway) and updates the user's <mark style="color:purple;">rich presence.</mark>

### A More Detailed Explanation

The app uses [Long Running Background services](https://developer.android.com/guide/components/services#:~:text=foreground%20services%20directly.-,Background,usually%20be%20a%20background%20service.) which maintains <mark style="color:purple;">Websocket</mark> connections to send <mark style="color:purple;">rich presence data</mark>. This process runs until the <mark style="color:purple;">rpc</mark> is switched off by user or when the device goes to sleep.

Rpc runs on [Threads](https://developer.android.com/reference/java/lang/Thread) with a 15second interval to send pings to Discord' Gateway to keep the connection alive.&#x20;


---

# 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://kizzy.gitbook.io/kizzy-docs/info/for-developers/understanding-app-process.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.
