# Kordophone Android Client

Android client for the Kordophone iMessage bridge. This app connects to a running Kordophone server over HTTP/JSON and streams updates.

Note: This client currently implements its own API layer in Kotlin and does not yet use the shared Rust `core` library.

## Build & Run

Requirements:

- Android Studio (AGP 8.x)
- JDK 8+ toolchain (project uses Java 8 bytecode)

Steps:

1. Open `android/` in Android Studio.
2. Sync Gradle and build the project.
3. Run the `app` configuration on an emulator or device.

The app targets `minSdk 30`, `targetSdk 33` and uses Jetpack Compose.

## Configure Server

Set the server host and optional Basic Auth from the app’s Settings screen.

- Server URL for local mock (emulator): `http://10.0.2.2:5738`
- Server URL for local mock (device): `http://<your-host-ip>:5738`
- Credentials: match the server if auth is enabled (mock supports `--auth`).

Settings are persisted using `EncryptedSharedPreferences`.

## Modules

- `app/` — UI (Compose), DI (Hilt), app wiring
- `backend/` — Kotlin API client, DB/cache (Realm), models, tests

## Testing with the Mock Server

Start the mock server in the repo root:

```bash
cd mock
go run ./...          # or: make; ./kordophone-mock
```

Set the app’s server URL to the mock address and run. The mock implements the Kordophone server API; see centralized API documentation (planned under `api/`).
