Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3a4ca66
docs: expand Android SDK overview with detailed features and benefits
dzienisz Sep 14, 2025
74c73b1
update
dzienisz Sep 15, 2025
4a88a73
Update
dzienisz Sep 15, 2025
4a92aed
docs: simplify demo sections by replacing SystemCard components with …
dzienisz Sep 15, 2025
c33fdc4
docs: reorganize Android SDK docs and merge modules into overview sec…
dzienisz Sep 16, 2025
456ff63
docs: enhance Android SDK documentation with detailed features and us…
dzienisz Sep 18, 2025
acfed4b
docs: update references from Tolgee Mobile SDK to Tolgee Android SDK …
dzienisz Sep 19, 2025
014eb1e
docs: improve Maven Central configuration instructions and error hand…
dzienisz Sep 19, 2025
a2a4e66
fix: correct syntax and method names in Android SDK usage documentation
dzienisz Sep 19, 2025
210e7e7
docs: fix bullet point formatting in Android SDK usage examples
dzienisz Sep 19, 2025
52a26aa
docs: update instructions for adding CDN URL prefix in Quickstart and…
dzienisz Sep 21, 2025
373e446
docs: enhance troubleshooting and usage documentation, add recommenda…
dzienisz Sep 21, 2025
2101cc0
docs: add Quickstart, Usage, and Troubleshooting guides for Core Module
dzienisz Sep 21, 2025
f8692ca
docs: simplify and reorganize Android SDK documentation
dzienisz Sep 24, 2025
c0698b1
docs: fix broken relative links and rename recommendations to product…
dzienisz Sep 25, 2025
9832ed8
docs: update Android SDK overview and get started docs for clarity an…
dzienisz Oct 1, 2025
35c69d6
refactor: extract Android API requirement into reusable component
dzienisz Oct 1, 2025
19b97aa
docs: add Android and Jetpack Compose icons to SDK documentation
dzienisz Oct 2, 2025
3e8c730
docs: rename about to overview and installation to quickstart for bet…
dzienisz Oct 2, 2025
d02a215
docs: update Android SDK requirements and compatibility information
dzienisz Oct 2, 2025
3c2bac9
feat: add emoji icons to Android SDK usage cards
dzienisz Oct 2, 2025
1360b08
docs: remove redundant overview section from Android SDK integration …
dzienisz Oct 2, 2025
114018f
docs: improve heading hierarchy and fix formatting in Android SDK docs
dzienisz Oct 2, 2025
d201ffe
docs: update navigation links and rename installation to quickstart i…
dzienisz Oct 2, 2025
d24b262
docs: update Jetpack Compose documentation links from /installation t…
dzienisz Oct 2, 2025
922ecb3
docs: enhance Quickstart (Core Module) with clearer steps and improve…
dzienisz Oct 2, 2025
373a55e
docs: improve Android SDK quickstart guide structure and clarity
dzienisz Oct 2, 2025
5c7646c
docs: enhance Quickstart and Usage guides for Android SDK with cleare…
dzienisz Oct 3, 2025
7156091
docs: add reusable Android API requirement component to overview page
dzienisz Oct 3, 2025
15ee967
docs: move CLI info section below feature list in Android SDK overview
dzienisz Oct 3, 2025
79d9da6
docs: enhance Android SDK getting started guide with feature grid and…
dzienisz Oct 3, 2025
3938f0f
docs: add links to content delivery docs and improve formatting consi…
dzienisz Oct 3, 2025
13c7790
docs: update troubleshooting and overview documentation for clarity a…
dzienisz Oct 6, 2025
ba8e6c9
docs: update Compose quickstart link text from Installation to Quicks…
dzienisz Oct 6, 2025
62a5e7f
docs: revise Android SDK overview with clearer structure and benefits
dzienisz Oct 6, 2025
2ddb624
docs: reorganize Android SDK docs into installation, setup and exampl…
dzienisz Oct 6, 2025
e44e60d
docs: consolidate troubleshooting guides and streamline Jetpack usage…
dzienisz Oct 6, 2025
d19c5f1
docs: remove redundant warnings about preloading translations in Andr…
dzienisz Oct 7, 2025
c2c4c3f
docs: update Android SDK documentation links to new structure
dzienisz Oct 7, 2025
29033ce
docs: remove Android production guide and Jetpack Compose references
dzienisz Oct 7, 2025
5b6bb9a
docs: fix broken installation link in Android SDK overview
dzienisz Oct 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions android-sdk/about.mdx

This file was deleted.

87 changes: 87 additions & 0 deletions android-sdk/example-apps.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
id: example-apps
title: Example Apps
slug: /example-apps
description: Example apps for Tolgee Android SDK with Over‑the‑Air (OTA) localization updates for Android and Compose Multiplatform.
---

import { ScreenshotWrapper } from '../platform/shared/_ScreenshotWrapper';

# Example Apps

Explore fully functional demo applications showcasing Tolgee Android SDK integration. Each example demonstrates best practices for implementing Over-the-Air translation updates in different Android development environments.

<ScreenshotWrapper
src="/img/docs/sdk/android-studio.png"
alt="Android Studio"
/>

## Android Views Demo

**Perfect for traditional Android development**

A complete reference implementation using classic Android Views and XML layouts. This example demonstrates:

- ✅ One-time and dynamic translation methods
- ✅ Locale switching and change detection
- ✅ Integration with Android string resources
- ✅ Parameter support for dynamic content
- ✅ Proper Application-level initialization

**[View Android Views Example →](https://github.com/tolgee/tolgee-mobile-kotlin-sdk/tree/master/demo/exampleandroid)**

---

## Jetpack Compose Demo

**Modern declarative UI with reactive translations**

A comprehensive example showcasing Tolgee integration with Jetpack Compose. Features include:

- ✅ `stringResource()` composables for direct translation
- ✅ Parameter support for dynamic content
- ✅ Reactive UI updates when locale changes
- ✅ Formatter configuration options
- ✅ Integration with Compose state system

**[View Jetpack Compose Example →](https://github.com/tolgee/tolgee-mobile-kotlin-sdk/tree/master/demo/examplejetpack)**

---

## Compose Multiplatform Demo

**Cross-platform translations for Android, iOS, and Desktop**

A full-featured multiplatform application demonstrating Tolgee's Kotlin Multiplatform capabilities:

- ✅ Shared translation logic across platforms
- ✅ Compose Multiplatform UI integration
- ✅ Cross-platform resource handling
- ✅ Common API for all supported platforms
- ✅ Multiplatform development patterns

**[View Compose Multiplatform Example →](https://github.com/tolgee/tolgee-mobile-kotlin-sdk/tree/master/demo/examplecomposemultiplatform)**

---

## Getting Started with Examples

1. **Clone the repository**:

```bash
git clone https://github.com/tolgee/tolgee-mobile-kotlin-sdk.git
```
2. **Navigate to the demo folder**: Choose the example that matches your tech stack
3. **Open in Android Studio**: Import the project and sync Gradle
4. **Configure your CDN URL**: Add your Tolgee project's CDN URL in the initialization code
5. **Run and explore**: See live translation updates in action

:::tip
These examples are actively maintained and updated with each SDK release. They're the best way to learn Tolgee integration patterns and troubleshoot issues.
:::

## Next Steps

- **New to Tolgee?** Start with [Installation](./installation)
- **Need help?** Check [Troubleshooting](./troubleshooting)

129 changes: 61 additions & 68 deletions android-sdk/installation.mdx
Original file line number Diff line number Diff line change
@@ -1,48 +1,71 @@
---
id: installation
title: Installation
description: How to install Tolgee Android SDK in your Android project
description: Installation guide for Tolgee Android SDK
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can merge the installation and setup pages. I am not sure why for example the Network Configuration goes to installation, but not to the setup.

---

> **NOTE:**
> For managing static translations, we recommend using [Tolgee CLI](https://github.com/tolgee/tolgee-cli).
import AndroidApiRequirement from '@site/src/component/AndroidApiRequirement';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

:::note
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we need to include this. What do you think @Anty0 ?

Configuration examples below are written in Kotlin DSL. Groovy DSL should work but is not officially supported/tested.
:::

## Requirements

- **Android API Level**: 21+ (Android 5.0+)
<AndroidApiRequirement />

## Quickstart (Views)
## Setup dependencies

1. Add dependency (Core):
To use the library, you need to add the dependency to your project.

Using Version Catalog is recommended to keep your versions aligned.
In `gradle/libs.versions.toml` add an alias for Tolgee Core library:

```toml
# gradle/libs.versions.toml
[libraries]
tolgee = { group = "io.tolgee.mobile-kotlin-sdk", name = "core", version.ref = "tolgee" }
```
:::info
Using **Version Catalog** is recommended to keep your versions aligned, especially in bigger projects.
This **provides readability, centralization, and consistency**.
:::

```kotlin
// build.gradle.kts (module)
dependencies {
implementation(libs.tolgee)
}
```
<Tabs
defaultValue="core"
values={[
{label: 'Core (Android Views)', value: 'core'},
{label: 'Compose (Jetpack/Multiplatform)', value: 'compose'},
]}>
<TabItem value="core">
```toml
[libraries]
tolgee = { group = "io.tolgee.mobile-kotlin-sdk", name = "core", version.ref = "tolgee" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the version ref @Anty0 ? Usually in the docs there is the latest version mentioned. I don't think I have ever seen version ref like this.

```
</TabItem>
<TabItem value="compose">
```toml
[libraries]
tolgee = { group = "io.tolgee.mobile-kotlin-sdk", name = "compose", version.ref = "tolgee" }
```
</TabItem>
</Tabs>

If you use Jetpack Compose, see the Compose variant: [Jetpack Installation](/android-sdk/jetpack/installation)

2. (If needed) Ensure repositories include Maven Central:
Then, in `build.gradle.kts`, use the created alias:

```kotlin
// settings.gradle.kts or build.gradle.kts
pluginManagement { repositories { gradlePluginPortal(); google(); mavenCentral() } }
dependencyResolutionManagement { repositories { google(); mavenCentral() } }
```

3. Allow CDN networking (required when using Tolgee Cloud CDN):
```kotlin
dependencies {
implementation(libs.tolgee)
}
```

Create a network security config file `network_security.xml` in your `res/xml` folder:
:::info
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove this as I don't think this would be a trouble for anyone. They will just simply copy paste it.

The Compose module includes Core transitively, so you don't need to add both.
:::

## Network Configuration

Enable Tolgee to fetch translations from the cloud at runtime. To do this, you need to configure network access.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again. We don't communicate in imperative in the docs, instead we use indicative. Please reread the whole docs and fix it everywhere.

Suggested change
Enable Tolgee to fetch translations from the cloud at runtime. To do this, you need to configure network access.
To enable the Tolgee SDK to fetch translations from the cloud at runtime, you need to configure network access.


Create a network security config file `network_security.xml` in your `res/xml` folder:

```xml
<?xml version="1.0" encoding="utf-8"?>
Expand All @@ -54,53 +77,23 @@ description: How to install Tolgee Android SDK in your Android project
</network-security-config>
```

In Android, the network security config must be explicitly linked in your `AndroidManifest.xml`, so the system knows to apply it.

Add network security config to your `AndroidManifest.xml`:

```xml
<application
android:networkSecurityConfig="@xml/network_security"> <!-- Add this line to your existing application tag -->
android:networkSecurityConfig="@xml/network_security"> <!-- Add this line to your existing application tag -->
</application>
```

> NOTE:
> Allowing `tolgee.io` and `tolg.ee` domains is required when using Tolgee Cloud CDN. If you only access your own self-hosted CDN, include your domain(s) accordingly.

## Initialization and configuration

Initialize Tolgee in your `Application` class.

```kotlin
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
Tolgee.init {
contentDelivery {
url = "https://cdn.tolg.ee/your-cdn-url-prefix" // from Tolgee Platform → Content Delivery
storage = TolgeeStorageProviderAndroid(this@MyApplication, BuildConfig.VERSION_CODE) // cache invalidates on app update
}
}
}
}
```

How to get your CDN URL prefix (Content Delivery):
- Open Tolgee Platform → your Project → Developer settings → Content Delivery.
- Copy the full CDN URL prefix. You can use different prefixes per environment (dev/staging/prod).
- Optional: Verify connectivity locally:

```bash
curl -I "https://cdn.tolg.ee/your-cdn-url-prefix/en.json"
```

You should receive a 200 response. If you get 403/404, double‑check the prefix.

> TIP:
> For Activities, wrap the base context so `getString` and similar APIs use Tolgee. See step-by-step in [Usage](./usage.mdx).

## Next steps
:::info
Allowing `tolgee.io` and `tolg.ee` domains is required when using Tolgee Cloud CDN.
If you access your own self-hosted CDN, here is where you should add the domain of your CDN.
:::

- Not sure which artifact to use? See [`Modules overview`](./modules.mdx)
- Learn how to fetch and render translations in Views: [`Usage`](./usage.mdx)
- Using Compose? Start here: [`Jetpack Installation`](./jetpack/installation.mdx)
- Having issues? Check [`Troubleshooting`](./troubleshooting.mdx)
## Next Steps

- Setup Tolgee Android SDK: [Setup](./setup.mdx)
- Learn how to fetch and render translations in Views: [Usage](./usage.mdx)
- Having issues? Check [Troubleshooting](./troubleshooting.mdx)
76 changes: 0 additions & 76 deletions android-sdk/jetpack/installation.mdx

This file was deleted.

Loading