nikogpt_android/README.md
Niko Marmeladkov a59271522c
Some checks failed
build / apk (push) Has been cancelled
1.3.1: offer updates in the app
The shell asks /api/app for the published version once per launch and
shows an update dialog (download + system installer) when a newer build
exists. The check is on by default and switchable: Settings -> App in the
web UI (a per-device preference stored in the app) or the dialog's
"don't check again" button.
2026-10-19 08:47:38 +03:00

3.7 KiB

NikoGPT for Android

Open-source Android client for the NikoGPT web chat (chat.n1ko.dev) — a thin, auditable WebView shell around the same web interface that runs in the browser. No analytics, no trackers, no third-party SDKs: the whole app is one activity and a handful of resources.

  • Android 10+ (minSdk 29), targets Android 15.
  • Everything the web app can do: conversations, attachments (system file picker), images, generated files, settings, themes.
  • Share anything to NikoGPT: from another app share text or any file (photos, PDFs, audio, archives…) straight into the composer.
  • Updates itself: the app checks the published version on launch and offers the update right there (download + system installer). The check can be turned off in Settings → App, or with "don't check again" in the dialog.
  • Downloads go through Android's DownloadManager (with your session cookies), links to other sites open in the system browser.
  • Open in the browser only: chat.n1ko.dev loads inside; anything else leaves the app.
  • TLS errors are never bypassed, no cleartext traffic, no backup.
  • Day/night theme follows the system; the page keeps its own theme setting.
  • Back gesture navigates the chat history; pull-to-refresh reloads only at the very top of the chat — never inside a presentation, a dialog or another list.

Install

Download the APK from the releases page: https://git.n1ko.dev/Niko/nikogpt_android/releases

Latest build: https://git.n1ko.dev/Niko/nikogpt_android/releases/download/v1.3.1/nikogpt-android-1.3.1.apk

Open the APK on the phone (allow installing apps from this source when Android asks). The APKs are signed with the project's release key; Android may still warn because the app is installed from outside Play.

Build

Requirements: JDK 17, Android SDK (platform 35, build-tools 35.0.0).

./gradlew assembleDebug     # app/build/outputs/apk/debug/app-debug.apk
./gradlew assembleRelease   # release; signed with the keystore when configured

Or just open the project in Android Studio.

Release signing

The published APKs are signed with the project's release keystore (keystore.properties + the .jks file, both outside git). To build them yourself, create a keystore and point keystore.properties at it:

keytool -genkeypair -v -keystore nikogpt.jks -alias nikogpt \
  -keyalg RSA -keysize 2048 -validity 10000
cat > keystore.properties <<EOF
storeFile=../nikogpt.jks
storePassword=...
keyAlias=nikogpt
keyPassword=...
EOF
./gradlew assembleRelease

Installing over a debug-signed build requires uninstalling it first (the signatures differ). The release certificate's SHA-256 must be listed in web.android_cert_sha256 in the bot config for App Links verification.

Sign-in

All credentials live on NikoAuth (auth.n1ko.dev): password, e-mail codes, 2FA and Google. The app opens the login in the system browser — Google refuses WebView logins, and a WebView never shares the browser's cookie jar — and comes back through a verified App Link (https://chat.n1ko.dev/app-auth?...) once the login is done; the server hands the fresh session to the app's WebView on that link. Requires the release certificate's SHA-256 in the bot's web.android_cert_sha256 for App Links verification.

Structure

Path Purpose
app/src/main/java/dev/n1ko/nikogpt/MainActivity.kt the whole app: WebView setup, file chooser, downloads, back handling
app/src/main/res/layout/activity_main.xml WebView + progress bar + retry screen
.forgejo/workflows/build.yml CI: builds the APK on tags

License

MIT — see LICENSE. The Tabler-based icons used by the web chat come from f.n1ko.dev/assets/ui (MIT).