> For the complete documentation index, see [llms.txt](https://docs.jentis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jentis.com/app-tracking-setup/legacy-android-builds.md).

# Legacy Android Builds

To support older Android versions, create your own fork of the Jentis SDK. Devices below Android 7.1.1 do not include the ISRG Root X1 certificate, so JENTIS tracking requests fail TLS validation. See Let's Encrypt's [compatibility notice](https://letsencrypt.org/2023/07/10/cross-sign-expiration/). To target those, publish a private fork with a modified `minSdk` and bundle the root certificate in your app. Below you will find a step-by-step example of how to support `minSdk` 24. Supporting API 23 or lower will need a custom `X509TrustManager` instead of using the `network-security-config`, which is out of scope here, but would follow a similar logic. Test the fork against the real tracking endpoint before shipping it.

1. Download [ISRG Root X1 (PEM)](https://letsencrypt.org/certs/isrgrootx1.pem) to the consuming application's `src/main/res/raw/isrg_root_x1.pem`. Verify its SHA-256 fingerprint is `96:BC:EC:06:26:49:76:F3:74:60:77:9A:CF:28:C5:A7:CF:E8:A3:C0:AA:E1:1A:8F:FC:EE:05:C0:BD:DF:08:C6` before committing it. You can use the following command to get the fingerprint:

```
openssl x509 -in isrgrootx1.pem -noout -fingerprint -sha256
```

2. Add `src/main/res/xml/network_security_config.xml` to your application module:

```
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config>
        <trust-anchors>
            <certificates src="system" />
            <certificates src="@raw/isrg_root_x1" />
        </trust-anchors>
    </base-config>
</network-security-config>
```

3. Add `android:networkSecurityConfig="@xml/network_security_config"` to the consuming application's `<application>` element inside the `AndroidManifest.xml`. If it already declares a network security configuration, add the ISRG Root X1 trust anchor to that existing configuration. This configuration automatically works with the default `OkHttpClient`. If you use an `OkHttpClient` with a custom `SSLSocketFactory` or `X509TrustManager`, you must add ISRG Root X1 to that trust manager as well, the XML configuration alone will not suffice. Keep system trust anchors enabled and retest whenever the backend certificate chain changes.
4. Adapt the `minSdk` of the Jentis SDK. For example, if you need API 24, change `jentissdk/build.gradle.kts` to `minSdk = 24`.
5. Perform other potentially required changes after the `minSdk` change (there are no known changes when downgrading to `minSdk` 24).
6. Build and publish the fork. Adapt consumers to use that artifact instead of the public SDK release.
7. Test your application on different devices running the desired `minSdk` up to SDK 25.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.jentis.com/app-tracking-setup/legacy-android-builds.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
