> 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/appendix-android-version-update.md).

# \[Android]ー Andoid向けSDKのバージョン管理とnative\_app\_updateイベントについて

### Android向けのSDKにおけるバージョン管理の概念

KARTE SDKでは、Androidアプリにおいて**version\_nameとversion\_code**という2つのバージョン管理の概念を使用しています。それぞれの役割は以下の通りです。

* version\_name: ユーザーに表示されるアプリのバージョンを表します。通常、build.gradleファイル内のversionNameで指定される値で、メジャーリリースや新機能の追加に伴って更新され、形式は「1.0.0」や「2.1.3」のようなバージョン番号になります。
* version\_code: アプリのビルド番号を表します。これもbuild.gradleファイル内のversionCodeで指定される整数値で、通常はバグ修正やマイナーチェンジなど、同一のバージョン内でのビルドを区別するために使用されます。

### native\_app\_updateイベントの発生条件

SDKにおいて、native\_app\_updateというイベントは、**version\_code**の変更が検出された際に発生します。

アプリが新しいビルドに更新され、version\_codeが前回のバージョンから異なる場合、このイベントがトリガーされます。これにより、アプリ内での適切な更新処理が実行されます。また、インストール時や、その他のアプリライフサイクルイベントにも対応しています。


---

# 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/appendix-android-version-update.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.
