> For the complete documentation index, see [llms.txt](https://app.developers.karte.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://app.developers.karte.io/android-sdk-appendix/concepts-sending-events-android-sdk.md).

# \[Android]イベント送信の仕様について

本ドキュメントでは、イベントを送信するまでに行われる処理、具体的にはイベントのバッファリングの仕組みについて説明します。

## イベントのバッファリングについて

発生したイベントは直接KARTEに送られず、一度SDK内部で一定時間バッファリングされた後に、一つのリクエストにまとめられてKARTEに送られます。

具体的には、（バッファがからの状態で）イベントが発生して `100ms` 以内に発生した他のイベントを一つのリクエストにまとめて送信します。

![buffering3](/files/6GJQsu6zQfqtmDwn3Qnu)

## イベントのバッファリングにおける制約

基本的には上記項目に記載した通り、時間経過に基づいてイベントのバッファリング・リクエストが行われますが、いくつかの例外的な制約が設けられており、その制約に該当する場合は即座にリクエストが行われます。

例外的な制約は、以下の通りです。

* 複数の画面に跨がるリクエストは作成できない
* 複数のユーザーに跨がるリクエストは作成できない
* 1つのリクエストに含まれるイベントの数は10個までとする

#### 複数の画面に跨がるリクエストとは？

画面Aで発生したイベントと画面Bで発生したイベントは同じリクエストとして送信されることはありません。

これはアプリ内メッセージの表示制御を適切に機能させるために行っているものになります。

![buffering4](/files/junnLtYSLPIhsJVYEqCt)

イベントがどの画面で発生したのかを認識するためにSDKでは画面の境界を認識する機能があります。\
詳細については下記ドキュメントをご覧ください。

* [画面の境界を認識する条件](/android-sdk-appendix/concepts-screen-boundary-android-sdk.md)

#### 複数のユーザーに跨がるリクエストとは？

異なるユーザーから同時に発生したイベントは同じリクエストとして送信されることはありません。

この制約に基づきリクエストが分割されるのは、基本的にビジターIDのリセットを行った時に限ります。


---

# 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://app.developers.karte.io/android-sdk-appendix/concepts-sending-events-android-sdk.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.
