Open-source Android WebView client for the NikoGPT web chat (chat.n1ko.dev), Android 10+
Find a file
Niko Marmeladkov b2914f685a
Some checks failed
build / apk (push) Has been cancelled
Google sign-in fallback chain: Credential Manager -> legacy API (microG) -> browser
- try Credential Manager first; on any failure fall back to the legacy
  GoogleSignIn API, which microG implements
- only when no Google provider is available (isGooglePlayServicesAvailable
  fails) use the browser flow with the nikogpt:// hand-back
- README: document the order and the Android OAuth client requirements
- version 1.0.4
2026-10-05 17:31:30 +03:00
.forgejo/workflows NikoGPT Android 1.0.0: open-source WebView client for chat.n1ko.dev 2026-10-05 16:18:00 +03:00
app Google sign-in fallback chain: Credential Manager -> legacy API (microG) -> browser 2026-10-05 17:31:30 +03:00
gradle/wrapper NikoGPT Android 1.0.0: open-source WebView client for chat.n1ko.dev 2026-10-05 16:18:00 +03:00
.gitignore NikoGPT Android 1.0.0: open-source WebView client for chat.n1ko.dev 2026-10-05 16:18:00 +03:00
build.gradle.kts NikoGPT Android 1.0.0: open-source WebView client for chat.n1ko.dev 2026-10-05 16:18:00 +03:00
gradle.properties NikoGPT Android 1.0.0: open-source WebView client for chat.n1ko.dev 2026-10-05 16:18:00 +03:00
gradlew NikoGPT Android 1.0.0: open-source WebView client for chat.n1ko.dev 2026-10-05 16:18:00 +03:00
gradlew.bat NikoGPT Android 1.0.0: open-source WebView client for chat.n1ko.dev 2026-10-05 16:18:00 +03:00
LICENSE NikoGPT Android 1.0.0: open-source WebView client for chat.n1ko.dev 2026-10-05 16:18:00 +03:00
README.md Google sign-in fallback chain: Credential Manager -> legacy API (microG) -> browser 2026-10-05 17:31:30 +03:00
settings.gradle.kts NikoGPT Android 1.0.0: open-source WebView client for chat.n1ko.dev 2026-10-05 16:18:00 +03:00

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.
  • 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.

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.0.0/nikogpt-android-1.0.0.apk

Open the APK on the phone (allow installing apps from this source when Android asks). The APK is debug-signed for now, so Android may show a warning.

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   # unsigned; sign it yourself

Or just open the project in Android Studio.

Release signing

Create a keystore and export it as Gradle properties or use apksigner on the release output:

keytool -genkeypair -v -keystore nikogpt.jks -alias nikogpt \
  -keyalg RSA -keysize 2048 -validity 10000
apksigner sign --ks nikogpt.jks --out nikogpt-release.apk \
  app/build/outputs/apk/release/app-release-unsigned.apk

Google sign-in

Native "Continue with Google" is attempted in this order:

  1. Credential Manager (modern GMS) — the standard account sheet;
  2. legacy Google Sign-In API — this is what microG implements, so the native picker works on de-Googled ROMs with microG and a Google account added there;
  3. browser flow — used when neither provider is available (no GMS, no microG, or cancelled); the browser returns to the app through the nikogpt://auth deep link and the session lands in the WebView.

Native sign-in needs an Android-type OAuth client in the same Google Cloud project, with the app's package name (dev.n1ko.nikogpt) and the SHA-1 of the signing certificate. The web client id (from the server) is passed as serverClientId.

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).