Recently Written · git

ideamine

An idea inbox for Claude Code: /idea saves ideas at zero tokens; Claude triages them and routes each to the cheapest model that can build it.

git clone https://github.com/equwal/ideamine

Log | Files | Refs


commit 5bc25f961ddf9c355413a86e2489099c934d17f3
equwal <13551856+equwal@users.noreply.github.com>
2026-09-22 18:17:19 -0700

Add an Android app: the dashboard in a window, with a share button

The app shows the page of the ideamine server. Two things a browser tab
cannot do: a text shared from another app opens the composer with that
text, and "New idea" on the icon opens the composer empty. Both use the
?text= and ?new=1 of the page, so the app holds no logic of its own.

The app keeps no ideas. It needs the network of the server, for example
the WireGuard tunnel, and it says so when the server does not answer.
Plain HTTP is allowed for the names of the dashboard only.

android/icons.mjs draws the launcher icons from the same drawing as the
icons of the page. Build: cd android && ./gradlew assembleDebug.

 .gitignore                                         |   7 +
 README.md                                          |   2 +
 android/README.md                                  |  29 +++
 android/app/build.gradle.kts                       |  64 ++++++
 android/app/src/main/AndroidManifest.xml           |  46 ++++
 .../main/java/dev/equwal/ideamine/MainActivity.kt  | 142 ++++++++++++
 android/app/src/main/res/layout/activity_main.xml  |  44 ++++
 .../src/main/res/mipmap-anydpi-v26/ic_launcher.xml |   5 +
 .../app/src/main/res/mipmap-hdpi/ic_foreground.png | Bin 0 -> 3782 bytes
 .../app/src/main/res/mipmap-hdpi/ic_launcher.png   | Bin 0 -> 2131 bytes
 .../app/src/main/res/mipmap-mdpi/ic_foreground.png | Bin 0 -> 2140 bytes
 .../app/src/main/res/mipmap-mdpi/ic_launcher.png   | Bin 0 -> 1513 bytes
 .../src/main/res/mipmap-xhdpi/ic_foreground.png    | Bin 0 -> 4832 bytes
 .../app/src/main/res/mipmap-xhdpi/ic_launcher.png  | Bin 0 -> 2816 bytes
 .../src/main/res/mipmap-xxhdpi/ic_foreground.png   | Bin 0 -> 7662 bytes
 .../app/src/main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 4230 bytes
 .../src/main/res/mipmap-xxxhdpi/ic_foreground.png  | Bin 0 -> 10494 bytes
 .../src/main/res/mipmap-xxxhdpi/ic_launcher.png    | Bin 0 -> 5556 bytes
 android/app/src/main/res/values/colors.xml         |   6 +
 android/app/src/main/res/values/strings.xml        |  10 +
 android/app/src/main/res/values/themes.xml         |   8 +
 .../src/main/res/xml/network_security_config.xml   |  10 +
 android/app/src/main/res/xml/shortcuts.xml         |  13 ++
 android/build.gradle.kts                           |   5 +
 android/gradle.properties                          |   6 +
 android/gradle/wrapper/gradle-wrapper.jar          | Bin 0 -> 47505 bytes
 android/gradle/wrapper/gradle-wrapper.properties   |   9 +
 android/gradlew                                    | 248 +++++++++++++++++++++
 android/gradlew.bat                                |  82 +++++++
 android/icons.mjs                                  |  31 +++
 android/settings.gradle.kts                        |  24 ++
 31 files changed, 791 insertions(+)
diff --git a/.gitignore b/.gitignore
index d56c12b..f116e0b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,10 @@ node_modules/
 *.tmp
 *.log
 .DS_Store
+
+# the Android app
+android/.gradle/
+android/build/
+android/app/build/
+android/local.properties
+android/keystore.properties
diff --git a/README.md b/README.md
index 9d028c4..257d4b3 100644
--- a/README.md
+++ b/README.md
@@ -221,6 +221,8 @@ The dashboard is also an app for a phone. Open it and put it on the home screen:
 
 The icons are in the repository. `node dashboard/icons.mjs` draws them again.
 
+`android/` holds an Android app: the same page in a window of its own, with a share button. Send a text from any app to ideamine, and the composer opens with it. See [android/README.md](android/README.md). It is not in a store, because the dashboard answers only on your private network, where a reviewer cannot reach it.
+
 ### Prompts, Memory, and Usage
 
 The dashboard can also show what your Claudes did:
diff --git a/android/README.md b/android/README.md
new file mode 100644
index 0000000..c9d8688
--- /dev/null
+++ b/android/README.md
@@ -0,0 +1,29 @@
+# ideamine for Android
+
+A window on your ideamine dashboard, with two things that a browser tab cannot do:
+
+- **Share into your ideas.** Send a text from any app to "ideamine", and the composer of the page opens with that text.
+- **New idea from the icon.** Hold the icon and pick "New idea": the composer opens empty.
+
+The app keeps no ideas of its own. It shows the page of your ideamine server, so it needs the network of that server, for example your WireGuard tunnel. The first screen is the board; when the server does not answer, the app says so and offers the address of the server, which you can change.
+
+## Build
+
+```bash
+cd android
+./gradlew assembleDebug
+```
+
+The APK is then `app/build/outputs/apk/debug/app-debug.apk`. Install it with `adb install -r <apk>`, or copy it to the phone and open it.
+
+For a signed APK, put `keystore.properties` in this folder with `storeFile`, `storePassword`, `keyAlias`, and `keyPassword`, then run `./gradlew assembleRelease`. Without that file the release build still runs and makes an unsigned APK.
+
+`node icons.mjs` draws the launcher icons again from the same drawing as the icons of the page.
+
+## Why not Google Play
+
+The dashboard answers only on your private network. A reviewer at Google or Apple cannot reach it, so the app would show them an error, and the store would refuse it. Install the APK directly, or put it in F-Droid, where a private server is normal.
+
+## iPhone
+
+There is no iOS app, and none is needed: open the dashboard in Safari and use "Add to Home Screen". The page then has its own icon and opens without the address bar. An iOS app with the same share button would need a Mac, a paid Apple account, and the same store review.
diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts
new file mode 100644
index 0000000..07459b9
--- /dev/null
+++ b/android/app/build.gradle.kts
@@ -0,0 +1,64 @@
+import java.util.Properties
+
+plugins {
+    id("com.android.application")
+    id("org.jetbrains.kotlin.android")
+}
+
+/**
+ * Release signing is optional. The keys come from keystore.properties in the root of the project,
+ * which is not in the repository. Without that file the release build still makes an unsigned APK,
+ * so a fresh clone always builds.
+ */
+val keystoreProps = Properties().apply {
+    val file = rootProject.file("keystore.properties")
+    if (file.exists()) file.inputStream().use { load(it) }
+}
+val hasSigning = keystoreProps.getProperty("storeFile") != null
+
+android {
+    namespace = "dev.equwal.ideamine"
+    compileSdk = 36
+
+    defaultConfig {
+        applicationId = "dev.equwal.ideamine"
+        minSdk = 31
+        targetSdk = 36
+        versionCode = 1
+        versionName = "0.1.0"
+    }
+
+    signingConfigs {
+        if (hasSigning) {
+            create("release") {
+                storeFile = rootProject.file(keystoreProps.getProperty("storeFile"))
+                storePassword = keystoreProps.getProperty("storePassword")
+                keyAlias = keystoreProps.getProperty("keyAlias")
+                keyPassword = keystoreProps.getProperty("keyPassword")
+            }
+        }
+    }
+
+    buildTypes {
+        release {
+            // No shrinking: the app is a window on the dashboard, and R8 adds nothing here.
+            isMinifyEnabled = false
+            if (hasSigning) signingConfig = signingConfigs.getByName("release")
+        }
+    }
+
+    compileOptions {
+        sourceCompatibility = JavaVersion.VERSION_17
+        targetCompatibility = JavaVersion.VERSION_17
+    }
+
+    kotlin {
+        compilerOptions {
+            jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
+        }
+    }
+}
+
+dependencies {
+    implementation("androidx.activity:activity:1.11.0")
+}
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..59cda17
--- /dev/null
+++ b/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@mipmap/ic_launcher"
+        android:label="@string/app_name"
+        android:networkSecurityConfig="@xml/network_security_config"
+        android:roundIcon="@mipmap/ic_launcher"
+        android:supportsRtl="true"
+        android:theme="@style/Theme.Ideamine">
+
+        <activity
+            android:name=".MainActivity"
+            android:configChanges="orientation|screenSize|screenLayout|keyboardHidden|uiMode"
+            android:exported="true"
+            android:launchMode="singleTask"
+            android:windowSoftInputMode="adjustResize">
+
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+
+            <!-- Share a text from another app: it lands in the composer of the dashboard. -->
+            <intent-filter>
+                <action android:name="android.intent.action.SEND" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <data android:mimeType="text/plain" />
+            </intent-filter>
+
+            <!-- "New idea" on a long press of the icon. -->
+            <intent-filter>
+                <action android:name="dev.equwal.ideamine.NEW_IDEA" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+
+            <meta-data
+                android:name="android.app.shortcuts"
+                android:resource="@xml/shortcuts" />
+        </activity>
+    </application>
+</manifest>
diff --git a/android/app/src/main/java/dev/equwal/ideamine/MainActivity.kt b/android/app/src/main/java/dev/equwal/ideamine/MainActivity.kt
new file mode 100644
index 0000000..82ffc3f
--- /dev/null
+++ b/android/app/src/main/java/dev/equwal/ideamine/MainActivity.kt
@@ -0,0 +1,142 @@
+package dev.equwal.ideamine
+
+import android.annotation.SuppressLint
+import android.app.AlertDialog
+import android.content.Intent
+import android.net.Uri
+import android.os.Bundle
+import android.view.View
+import android.webkit.WebResourceError
+import android.webkit.WebResourceRequest
+import android.webkit.WebView
+import android.webkit.WebViewClient
+import android.widget.Button
+import android.widget.EditText
+import android.widget.LinearLayout
+import android.widget.TextView
+import androidx.activity.ComponentActivity
+import androidx.activity.OnBackPressedCallback
+
+/**
+ * A window on the ideamine dashboard. The dashboard itself is the app: this activity only keeps the
+ * address of the server, shows the page, and gives a shared text to the composer of the page.
+ *
+ * The server answers on a private network (WireGuard), so the page is not on the internet and the
+ * app talks to it over plain HTTP. network_security_config.xml allows that for those names only.
+ */
+class MainActivity : ComponentActivity() {
+
+    private lateinit var web: WebView
+    private lateinit var errorView: LinearLayout
+    private lateinit var errorText: TextView
+
+    private val settings by lazy { getSharedPreferences("ideamine", MODE_PRIVATE) }
+
+    private var server: String
+        get() = settings.getString("server", DEFAULT_SERVER) ?: DEFAULT_SERVER
+        set(value) = settings.edit().putString("server", clean(value)).apply()
+
+    @SuppressLint("SetJavaScriptEnabled")
+    override fun onCreate(state: Bundle?) {
+        super.onCreate(state)
+        setContentView(R.layout.activity_main)
+        web = findViewById(R.id.web)
+        errorView = findViewById(R.id.error)
+        errorText = findViewById(R.id.error_text)
+        findViewById<Button>(R.id.retry).setOnClickListener { open(urlFor(intent) ?: server) }
+        findViewById<Button>(R.id.change_server).setOnClickListener { askForServer() }
+
+        web.settings.javaScriptEnabled = true
+        web.settings.domStorageEnabled = true
+        web.settings.databaseEnabled = true
+        web.settings.mediaPlaybackRequiresUserGesture = false
+        web.webViewClient = object : WebViewClient() {
+            override fun shouldOverrideUrlLoading(view: WebView, request: WebResourceRequest): Boolean {
+                val url = request.url
+                if (url.host == Uri.parse(server).host) return false // the dashboard stays in the app
+                startActivity(Intent(Intent.ACTION_VIEW, url)) // another site opens in the browser
+                return true
+            }
+
+            override fun onReceivedError(view: WebView, request: WebResourceRequest, error: WebResourceError) {
+                if (!request.isForMainFrame) return
+                showError(getString(R.string.no_server, server))
+            }
+
+            override fun onPageFinished(view: WebView, url: String) {
+                if (errorView.visibility != View.VISIBLE) web.visibility = View.VISIBLE
+            }
+        }
+
+        onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
+            override fun handleOnBackPressed() {
+                if (web.canGoBack()) web.goBack() else finish()
+            }
+        })
+
+        open(urlFor(intent) ?: server)
+    }
+
+    /** A share or the shortcut while the app runs: the page opens again for it. */
+    override fun onNewIntent(intent: Intent) {
+        super.onNewIntent(intent)
+        setIntent(intent)
+        urlFor(intent)?.let { open(it) }
+    }
+
+    /**
+     * The address of the dashboard for this intent: a shared text goes to the composer of the page,
+     * and the "New idea" shortcut opens the composer empty. Null means: only show the board.
+     */
+    private fun urlFor(intent: Intent?): String? {
+        val address = Uri.parse(server).buildUpon()
+        if (intent?.action == NEW_IDEA) return address.appendQueryParameter("new", "1").build().toString()
+        if (intent?.action != Intent.ACTION_SEND) return null
+        val parts = listOfNotNull(
+            intent.getStringExtra(Intent.EXTRA_SUBJECT),
+            intent.getStringExtra(Intent.EXTRA_TEXT),
+        )
+        if (parts.isEmpty()) return null
+        return address.appendQueryParameter("text", parts.joinToString("\n")).build().toString()
+    }
+
+    private fun open(url: String) {
+        errorView.visibility = View.GONE
+        web.loadUrl(url)
+    }
+
+    private fun showError(message: String) {
+        errorText.text = message
+        errorView.visibility = View.VISIBLE
+        web.visibility = View.GONE
+    }
+
+    /** The address of the server. Each device on the private network has its own. */
+    private fun askForServer() {
+        val input = EditText(this).apply {
+            setText(server)
+            setSingleLine()
+        }
+        AlertDialog.Builder(this)
+            .setTitle(R.string.server_title)
+            .setView(input)
+            .setPositiveButton(R.string.save) { _, _ ->
+                server = input.text.toString()
+                open(server)
+            }
+            .setNegativeButton(R.string.cancel, null)
+            .show()
+    }
+
+    companion object {
+        const val DEFAULT_SERVER = "http://mem.equwal.com/"
+        const val NEW_IDEA = "dev.equwal.ideamine.NEW_IDEA"
+
+        /** An address with a scheme and a slash at the end, so that a shared text can go after it. */
+        fun clean(raw: String): String {
+            val trimmed = raw.trim().ifEmpty { DEFAULT_SERVER }
+            val withScheme = if (trimmed.startsWith("http://") || trimmed.startsWith("https://")) trimmed else "http://$trimmed"
+            return if (withScheme.endsWith("/")) withScheme else "$withScheme/"
+        }
+    }
+}
diff --git a/android/app/src/main/res/layout/activity_main.xml b/android/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..a09e7ed
--- /dev/null
+++ b/android/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/background"
+    android:fitsSystemWindows="true">
+
+    <WebView
+        android:id="@+id/web"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:visibility="invisible" />
+
+    <LinearLayout
+        android:id="@+id/error"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:gravity="center"
+        android:orientation="vertical"
+        android:padding="24dp"
+        android:visibility="gone">
+
+        <TextView
+            android:id="@+id/error_text"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:textColor="@color/text"
+            android:textSize="16sp" />
+
+        <Button
+            android:id="@+id/retry"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="20dp"
+            android:text="@string/retry" />
+
+        <Button
+            android:id="@+id/change_server"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/server_title" />
+    </LinearLayout>
+</FrameLayout>
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..e8a29b5
--- /dev/null
+++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@color/background" />
+    <foreground android:drawable="@mipmap/ic_foreground" />
+</adaptive-icon>
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_foreground.png b/android/app/src/main/res/mipmap-hdpi/ic_foreground.png
new file mode 100644
index 0000000..9affb7e
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..8ac488c
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_foreground.png b/android/app/src/main/res/mipmap-mdpi/ic_foreground.png
new file mode 100644
index 0000000..3173ef5
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..17284ca
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_foreground.png b/android/app/src/main/res/mipmap-xhdpi/ic_foreground.png
new file mode 100644
index 0000000..c7671b3
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..165c125
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_foreground.png b/android/app/src/main/res/mipmap-xxhdpi/ic_foreground.png
new file mode 100644
index 0000000..06db95b
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..562c197
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_foreground.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_foreground.png
new file mode 100644
index 0000000..de40e77
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..c204d73
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..b7af3cf
--- /dev/null
+++ b/android/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <!-- The colours of the dark board, so that the app does not flash white while the page loads. -->
+    <color name="background">#0B0B0B</color>
+    <color name="text">#FFFFFF</color>
+</resources>
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..a7322f9
--- /dev/null
+++ b/android/app/src/main/res/values/strings.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name">ideamine</string>
+    <string name="no_server">The ideamine server at %1$s does not answer. Turn on the WireGuard tunnel of this device, then try again.</string>
+    <string name="retry">Try again</string>
+    <string name="server_title">Address of the server</string>
+    <string name="save">Save</string>
+    <string name="cancel">Cancel</string>
+    <string name="new_idea">New idea</string>
+</resources>
diff --git a/android/app/src/main/res/values/themes.xml b/android/app/src/main/res/values/themes.xml
new file mode 100644
index 0000000..458f003
--- /dev/null
+++ b/android/app/src/main/res/values/themes.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <style name="Theme.Ideamine" parent="android:Theme.Material.NoActionBar">
+        <item name="android:windowBackground">@color/background</item>
+        <item name="android:statusBarColor">@color/background</item>
+        <item name="android:navigationBarColor">@color/background</item>
+    </style>
+</resources>
diff --git a/android/app/src/main/res/xml/network_security_config.xml b/android/app/src/main/res/xml/network_security_config.xml
new file mode 100644
index 0000000..23cedfc
--- /dev/null
+++ b/android/app/src/main/res/xml/network_security_config.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- The dashboard lives on a private network, where a certificate of a public authority is not
+     possible. Plain HTTP is allowed for those names only; everything else needs HTTPS. -->
+<network-security-config>
+    <base-config cleartextTrafficPermitted="false" />
+    <domain-config cleartextTrafficPermitted="true">
+        <domain includeSubdomains="false">mem.equwal.com</domain>
+        <domain includeSubdomains="false">10.66.0.1</domain>
+    </domain-config>
+</network-security-config>
diff --git a/android/app/src/main/res/xml/shortcuts.xml b/android/app/src/main/res/xml/shortcuts.xml
new file mode 100644
index 0000000..2b6cb21
--- /dev/null
+++ b/android/app/src/main/res/xml/shortcuts.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
+    <shortcut
+        android:enabled="true"
+        android:icon="@mipmap/ic_launcher"
+        android:shortcutId="new-idea"
+        android:shortcutShortLabel="@string/new_idea">
+        <intent
+            android:action="dev.equwal.ideamine.NEW_IDEA"
+            android:targetClass="dev.equwal.ideamine.MainActivity"
+            android:targetPackage="dev.equwal.ideamine" />
+    </shortcut>
+</shortcuts>
diff --git a/android/build.gradle.kts b/android/build.gradle.kts
new file mode 100644
index 0000000..9ab8d1c
--- /dev/null
+++ b/android/build.gradle.kts
@@ -0,0 +1,5 @@
+// Versions are pinned, so a clean clone builds the same APK.
+plugins {
+    id("com.android.application") version "8.13.2" apply false
+    id("org.jetbrains.kotlin.android") version "2.2.21" apply false
+}
diff --git a/android/gradle.properties b/android/gradle.properties
new file mode 100644
index 0000000..df2b2de
--- /dev/null
+++ b/android/gradle.properties
@@ -0,0 +1,6 @@
+# jvmargs stay at the default, so Gradle does not fork a second JVM here
+org.gradle.parallel=true
+org.gradle.caching=true
+android.useAndroidX=true
+android.nonTransitiveRClass=true
+kotlin.code.style=official
diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..eddabd2
Binary files /dev/null and b/android/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..fec70bd
--- /dev/null
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,9 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
+networkTimeout=10000
+retries=0
+retryBackOffMs=500
+validateDistributionUrl=true
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/android/gradlew b/android/gradlew
new file mode 100644
index 0000000..249efbb
--- /dev/null
+++ b/android/gradlew
@@ -0,0 +1,248 @@
+#!/bin/sh
+
+#
+# Copyright © 2015 the original authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+##############################################################################
+#
+#   gradlew start up script for POSIX generated by Gradle.
+#
+#   Important for running:
+#
+#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+#       noncompliant, but you have some other compliant shell such as ksh or
+#       bash, then to run this script, type that shell name before the whole
+#       command line, like:
+#
+#           ksh gradlew
+#
+#       Busybox and similar reduced shells will NOT work, because this script
+#       requires all of these POSIX shell features:
+#         * functions;
+#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+#         * compound commands having a testable exit status, especially «case»;
+#         * various built-in commands including «command», «set», and «ulimit».
+#
+#   Important for patching:
+#
+#   (2) This script targets any POSIX shell, so it avoids extensions provided
+#       by Bash, Ksh, etc; in particular arrays are avoided.
+#
+#       The "traditional" practice of packing multiple parameters into a
+#       space-separated string is a well documented source of bugs and security
+#       problems, so this is (mostly) avoided, by progressively accumulating
+#       options in "$@", and eventually passing that to Java.
+#
+#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+#       see the in-line comments for details.
+#
+#       There are tweaks for specific operating systems such as AIX, CygWin,
+#       Darwin, MinGW, and NonStop.
+#
+#   (3) This script is generated from the Groovy template
+#       https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+#       within the Gradle project.
+#
+#       You can find Gradle at https://github.com/gradle/gradle/.
+#
+##############################################################################
+
+# Attempt to set APP_HOME
+
+# Resolve links: $0 may be a link
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+    APP_HOME=${app_path%"${app_path##*/}"}  # leaves a trailing /; empty if no leading path
+    [ -h "$app_path" ]
+do
+    ls=$( ls -ld "$app_path" )
+    link=${ls#*' -> '}
+    case $link in             #(
+      /*)   app_path=$link ;; #(
+      *)    app_path=$APP_HOME$link ;;
+    esac
+done
+
+# This is normally unused
+# shellcheck disable=SC2034
+APP_BASE_NAME=${0##*/}
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD=maximum
+
+warn () {
+    echo "$*"
+} >&2
+
+die () {
+    echo
+    echo "$*"
+    echo
+    exit 1
+} >&2
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "$( uname )" in                #(
+  CYGWIN* )         cygwin=true  ;; #(
+  Darwin* )         darwin=true  ;; #(
+  MSYS* | MINGW* )  msys=true    ;; #(
+  NONSTOP* )        nonstop=true ;;
+esac
+
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD=$JAVA_HOME/jre/sh/java
+    else
+        JAVACMD=$JAVA_HOME/bin/java
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD=java
+    if ! command -v java >/dev/null 2>&1
+    then
+        die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+fi
+
+# Increase the maximum file descriptors if we can.
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+    case $MAX_FD in #(
+      max*)
+        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+        # shellcheck disable=SC2039,SC3045
+        MAX_FD=$( ulimit -H -n ) ||
+            warn "Could not query maximum file descriptor limit"
+    esac
+    case $MAX_FD in  #(
+      '' | soft) :;; #(
+      *)
+        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+        # shellcheck disable=SC2039,SC3045
+        ulimit -n "$MAX_FD" ||
+            warn "Could not set maximum file descriptor limit to $MAX_FD"
+    esac
+fi
+
+# Collect all arguments for the java command, stacking in reverse order:
+#   * args from the command line
+#   * the main class name
+#   * -classpath
+#   * -D...appname settings
+#   * --module-path (only if needed)
+#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+    APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+
+    JAVACMD=$( cygpath --unix "$JAVACMD" )
+
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    for arg do
+        if
+            case $arg in                                #(
+              -*)   false ;;                            # don't mess with options #(
+              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath
+                    [ -e "$t" ] ;;                      #(
+              *)    false ;;
+            esac
+        then
+            arg=$( cygpath --path --ignore --mixed "$arg" )
+        fi
+        # Roll the args list around exactly as many times as the number of
+        # args, so each arg winds up back in the position where it started, but
+        # possibly modified.
+        #
+        # NB: a `for` loop captures its iteration list before it begins, so
+        # changing the positional parameters here affects neither the number of
+        # iterations, nor the values presented in `arg`.
+        shift                   # remove old arg
+        set -- "$@" "$arg"      # push replacement arg
+    done
+fi
+
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command:
+#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+#     and any embedded shellness will be escaped.
+#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+#     treated as '${Hostname}' itself on the command line.
+
+set -- \
+        "-Dorg.gradle.appname=$APP_BASE_NAME" \
+        -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
+        "$@"
+
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+    die "xargs is not available"
+fi
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+#   readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+#   set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+        printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+        xargs -n1 |
+        sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+        tr '\n' ' '
+    )" '"$@"'
+
+exec "$JAVACMD" "$@"
diff --git a/android/gradlew.bat b/android/gradlew.bat
new file mode 100644
index 0000000..a51ec4f
--- /dev/null
+++ b/android/gradlew.bat
@@ -0,0 +1,82 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem      https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+@rem SPDX-License-Identifier: Apache-2.0
+@rem
+
+@if "%DEBUG%"=="" @echo off
+@rem ##########################################################################
+@rem
+@rem  gradlew startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables, and ensure extensions are enabled
+setlocal EnableExtensions
+
+set DIRNAME=%~dp0
+if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if %ERRORLEVEL% equ 0 goto execute
+
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
+
+"%COMSPEC%" /c exit 1
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
+
+"%COMSPEC%" /c exit 1
+
+:execute
+@rem Setup the command line
+
+
+
+@rem Execute gradlew
+@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
+@rem which allows us to clear the local environment before executing the java command
+endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
+
+:exitWithErrorLevel
+@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
+"%COMSPEC%" /c exit %ERRORLEVEL%
diff --git a/android/icons.mjs b/android/icons.mjs
new file mode 100644
index 0000000..72b6437
--- /dev/null
+++ b/android/icons.mjs
@@ -0,0 +1,31 @@
+// The launcher icons of the app, from the same drawing as the icons of the page.
+// `node android/icons.mjs` writes them again.
+
+import fs from 'node:fs';
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+import { icon } from '../dashboard/icons.mjs';
+
+const RES = path.join(path.dirname(fileURLToPath(import.meta.url)), 'app', 'src', 'main', 'res');
+
+// The launcher icon of older Android, and the front layer of the adaptive icon. The front layer is
+// 108dp wide, and a phone can cut any shape from the middle 72dp, so the lamp stays small there.
+const DENSITIES = [['mdpi', 1], ['hdpi', 1.5], ['xhdpi', 2], ['xxhdpi', 3], ['xxxhdpi', 4]];
+
+for (const [name, scale] of DENSITIES) {
+  const dir = path.join(RES, `mipmap-${name}`);
+  fs.mkdirSync(dir, { recursive: true });
+  fs.writeFileSync(path.join(dir, 'ic_launcher.png'), icon(Math.round(48 * scale)));
+  fs.writeFileSync(path.join(dir, 'ic_foreground.png'), icon(Math.round(108 * scale), { maskable: true }));
+  console.log(`mipmap-${name}: ${Math.round(48 * scale)} and ${Math.round(108 * scale)}`);
+}
+
+const adaptive = `<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@color/background" />
+    <foreground android:drawable="@mipmap/ic_foreground" />
+</adaptive-icon>
+`;
+fs.mkdirSync(path.join(RES, 'mipmap-anydpi-v26'), { recursive: true });
+fs.writeFileSync(path.join(RES, 'mipmap-anydpi-v26', 'ic_launcher.xml'), adaptive);
+console.log('mipmap-anydpi-v26/ic_launcher.xml');
diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts
new file mode 100644
index 0000000..38f0087
--- /dev/null
+++ b/android/settings.gradle.kts
@@ -0,0 +1,24 @@
+pluginManagement {
+    repositories {
+        google {
+            content {
+                includeGroupByRegex("com\\.android.*")
+                includeGroupByRegex("com\\.google.*")
+                includeGroupByRegex("androidx.*")
+            }
+        }
+        mavenCentral()
+        gradlePluginPortal()
+    }
+}
+
+dependencyResolutionManagement {
+    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+    repositories {
+        google()
+        mavenCentral()
+    }
+}
+
+rootProject.name = "ideamine"
+include(":app")