diff --git a/.claude/commands/commit.md b/.claude/commands/commit.md index 06cd8db..8a32a99 100644 --- a/.claude/commands/commit.md +++ b/.claude/commands/commit.md @@ -1,7 +1,6 @@ --- description: Commit recent changes using a conventional commit message, after syncing with the remote. allowed-tools: Bash(git status:*), Bash(git pull:*), Bash(git diff:*), Bash(git add:*), Bash(git commit:*), Bash(git push:*), AskUserQuestion, Edit, Write -context: fork --- Commit recent changes using a conventional commit message, after syncing with the remote. diff --git a/.claude/commands/release.md b/.claude/commands/release.md index 4e47f56..7814e27 100644 --- a/.claude/commands/release.md +++ b/.claude/commands/release.md @@ -1,7 +1,6 @@ --- description: Bump the app version (major/minor/patch or explicit semver), update CHANGELOG.md, and commit the release. allowed-tools: Bash(git status:*), Bash(git pull:*), Bash(git diff:*), Bash(git add:*), Bash(git commit:*), Bash(git push:*), Read, Edit, Bash, AskUserQuestion, TodoWrite, TodoRead -context: fork --- You are preparing a new release for the AutoSugar Android app. Your job is to determine the new version number, update `app/build.gradle.kts`, restructure `CHANGELOG.md`, and commit the result. diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..6bcfb67 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,41 @@ +name: CodeQL + +on: + push: + branches: [main, develop] + pull_request: + branches: [main, develop] + schedule: + - cron: '0 4 * * 1' + +jobs: + analyze: + name: Analyze (Kotlin) + runs-on: ubuntu-latest + permissions: + security-events: write + actions: read + contents: read + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 + + - uses: gradle/actions/setup-gradle@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: java-kotlin + + - name: Build + run: ./gradlew assembleDebug + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: /language:java-kotlin diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 48a1b38..f071af9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -88,14 +88,23 @@ jobs: if: steps.tag_check.outputs.exists == 'false' run: echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > keystore.jks - - name: Build signed AAB + - name: Build signed APK and AAB if: steps.tag_check.outputs.exists == 'false' env: KEYSTORE_PATH: keystore.jks KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} KEY_ALIAS: ${{ secrets.KEY_ALIAS }} KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} - run: ./gradlew bundleRelease + run: ./gradlew assembleRelease bundleRelease + + - name: Upload APK to GitHub Release + if: steps.tag_check.outputs.exists == 'false' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release upload "${{ steps.version.outputs.tag }}" \ + app/build/outputs/apk/release/app-release.apk \ + --clobber - name: Prepare what's new for Google Play if: steps.tag_check.outputs.exists == 'false' diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c56b4a..2ad41b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,93 +5,30 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] -### Changed -- `/commit` command now includes frontmatter metadata for Claude Code command system integration - -### Added -- Unit tests for GlucoseEntry display logic (displayValue, displayDelta, trendArrow) -- Unit tests for ProfileSerializer JSON round-trip including alertsEnabled and icon fallback -- Expanded NightscoutRepository unit tests covering all methods (getCurrentEntry delta - handling, getThresholds defaults, getHistory, saveProfile upsert, deleteProfile, saveAll) - -### Fixed -- Remove hardcoded local JDK path from gradle.properties so CI builds succeed on GitHub Actions -- Add missing German translations for glucose alert strings (lint MissingTranslation) - -### Added -- Per-profile glucose alert notifications for high and low BG using - Nightscout's bgHigh/bgLow thresholds, with 15-minute repeat cooldown -- Predictive alerts: 15-min linear extrapolation warns before a - threshold is crossed (requires delta data from Nightscout) -- POST_NOTIFICATIONS permission for Android 13+ alert support - -### Changed -- Settings screen: profile cards show an alerts toggle; tap to edit, - long-press to drag-reorder profiles; unit removed from card display -- Profile edit screen: save moved to top-bar icon, test connection - placed directly below API token field, delete button moved to bottom -- `/commit` command now auto-stages recent changes and prompts about other unstaged files instead of stopping when nothing is staged - -### Added -- Monochrome adaptive icon (`ic_launcher_monochrome.xml`) for Android 13+ themed icon support -- `` layer added to `ic_launcher.xml` adaptive icon definition - -### Changed -- Adaptive icon background color updated from `#F4EFE4` to `#302919` - ### Added -- Fetch glucose target thresholds (`bgTargetBottom`/`bgTargetTop`) from Nightscout `/api/v1/status.json` and use them for the graph's target band and dynamic Y-axis scaling -- `StatusDto`, `SettingsDto`, `ThresholdsDto` DTOs for Nightscout status response -- `getStatus()` endpoint in `NightscoutApi` and `getTargetRange()` in `NightscoutRepository` +- CodeQL security analysis workflow (runs on push/PR to main and develop, weekly schedule) ### Changed -- Graph Y-axis now scales dynamically to fit actual readings plus the target range (with padding), instead of a fixed 40–400 mg/dL range -- Time labels moved to the bottom of the graph; grid lines skip values too close to chart edges - -### Added -- Glucose history graph in Car UI: 3-hour bitmap rendered via `Pane.setImage()` with target range band, dotted grid lines, drop-pin value labels at 20-min marks, and half-hour time labels -- Reading age ("X min ago") and received timestamp shown as secondary row in Car UI -- Expanded profile icon set: male, female, boy, girl, baby, elderly man, elderly woman variants -- German translations for all new strings +- Removed `context: fork` from commit and release command frontmatter ### Fixed -- Profile icon now shown in Settings overview list -- Glucose unit displayed as `mg/dL` / `mmol/L` (was `MG/DL` / `MMOL/L`) +- Release signing keystore path now resolved relative to project root via `rootProject.file()` -### Changed -- Icon picker in profile edit screen uses `FlowRow` for dynamic wrapping instead of fixed 4-per-row - -- TabTemplate for multi-profile switching (CarApi >= 6, 2–4 profiles); falls back to numbered icon ActionStrip -- Trend arrow rendered as bitmap image in Car UI row; delta shown below glucose value -- Configurable auto-refresh interval (30 s / 1 min / 2 min / 5 min) via Settings -- Configurable tab icon per profile (Person, Home, Heart, Star, Car, Medical) with icon picker in profile edit screen -- App launcher icon and mipmap assets -- DHU simulator setup guide (`TESTING.md`) -- `AppPreferencesDataStore` for persisting app-level preferences -- History endpoint (`getEntries`) in Nightscout API client - -### Fixed -- App not appearing in Android Auto (missing `com.google.android.gms.car.application` meta-data) -- Crash on `ActionStrip` exceeding max 1 titled action -- Glucose unit labels shown in uppercase (now `mg/dL` / `mmol/L`) -- Java 17 toolchain required for Kotlin 2.0.21 compatibility +## [1.0.0] - 2026-03-31 ### Added -- Gradle wrapper (8.9) so CI runners can build without a local Gradle install -- GitHub Actions CI workflow with separate Build, Unit Tests, and Lint jobs -- Branch strategy documented in AGENTS.md: `main` is protected, all work on `develop` +- Android Auto app for monitoring Nightscout CGM blood glucose data while driving +- Multi-profile support: monitor multiple Nightscout sources simultaneously with configurable tab icons and per-profile settings +- Car UI: current glucose value, trend arrow, delta, reading age, and 3-hour history graph with target range band +- Glucose alerts: high/low notifications with 15-minute cooldown and predictive alerts based on 15-min linear extrapolation +- Configurable auto-refresh interval (30 s, 1 min, 2 min, 5 min) +- Profile icon picker with male, female, boy, girl, baby, elderly man, and elderly woman variants +- Monochrome adaptive icon for Android 13+ themed icon support +- App UI translated into English, German, Spanish, French, Dutch, Italian, Portuguese, Arabic, Japanese, Chinese (Simplified), and Hindi +- Unit tests for GlucoseEntry display logic, ProfileSerializer JSON round-trip, and NightscoutRepository +- GitHub Actions CI workflow (Build, Unit Tests, Lint) and release workflow with signed APK and AAB artifacts +- Dedicated installation page and configuration guide on the project website -### Changed -- Replaced deprecated `kotlinOptions { jvmTarget }` with `kotlin { jvmToolchain(17) }` in app build script -- MIT License (Copyright 2026 Nico Wiedemann) -- Full Android project scaffold: Gradle version catalog, root and app-level build files, ProGuard rules -- `AndroidManifest.xml` with `CarAppService` (IOT category), `MainActivity`, internet and foreground-service permissions -- Data layer: `NightscoutProfile` and `GlucoseEntry` domain models, `EntryDto` Moshi DTO, `NightscoutApi` Retrofit interface, `NightscoutApiFactory` with per-URL instance caching and OkHttp logging interceptor -- Persistence: `ProfileDataStore` (DataStore) and `ProfileSerializer` (Moshi JSON) for storing N Nightscout profiles -- `NightscoutRepository` singleton (Hilt) exposing profile CRUD, active-profile state, and coroutine-based `getCurrentEntry` -- Car UI screens: `GlucoseScreen` (PaneTemplate, 60 s polling, ActionStrip for ≤4 sources), `SourceSelectScreen` (ListTemplate for >4 sources), `NoProfilesScreen` (watches for profiles added on phone) -- Phone settings UI: `SettingsScreen` (profile list), `ProfileEditScreen` (form with Test Connection), `SettingsViewModel`, `ProfileEditViewModel` -- `MainActivity` with Compose navigation host -- String resources in English and German (full i18n coverage) -- ADR 001: architecture, IOT category, and multi-source strategy -- Unit tests for `NightscoutRepository` (MockK + coroutines-test) +### Fixed +- App not appearing in Android Auto launcher (missing `com.google.android.gms.car.application` meta-data) +- Glucose unit labels now correctly shown as `mg/dL` / `mmol/L` diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3742949..fb23a3c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -14,13 +14,13 @@ android { applicationId = "de.autosugar" minSdk = 26 targetSdk = 35 - versionCode = 1 - versionName = "0.1.0" + versionCode = 2 + versionName = "1.0.0" } signingConfigs { create("release") { - storeFile = System.getenv("KEYSTORE_PATH")?.let { file(it) } + storeFile = System.getenv("KEYSTORE_PATH")?.let { rootProject.file(it) } storePassword = System.getenv("KEYSTORE_PASSWORD") keyAlias = System.getenv("KEY_ALIAS") keyPassword = System.getenv("KEY_PASSWORD") diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml new file mode 100644 index 0000000..d63a45a --- /dev/null +++ b/app/src/main/res/values-ar/strings.xml @@ -0,0 +1,60 @@ + + + AutoSugar + + + سكر الدم + الاتجاه + التغيير + mg/dL + mmol/L + تبديل المصدر + جارٍ التحميل… + فشل جلب البيانات + إعادة المحاولة + لم يتم تكوين أي مصادر.\nافتح AutoSugar على هاتفك لإضافة مصدر Nightscout. + 3h + الآن + منذ %d دقيقة + القراءة: %s + تم الاستقبال: %s + + + الإعدادات + إضافة مصدر + حفظ + حذف + تعديل + اختبار الاتصال + اسم العرض + رابط Nightscout (مثال: https://mynb.herokuapp.com) + رمز API + وحدة الجلوكوز + إضافة مصدر + تعديل المصدر + متصل! مستوى السكر الحالي: %1$s %2$s + فشل الاتصال: %1$s + تم حفظ المصدر. + تم حذف المصدر. + لا توجد مصادر بعد.\nاضغط + لإضافة رابط Nightscout الخاص بك. + أيقونة التبويب + + + تنبيهات الجلوكوز + تنبيهات الجلوكوز + تنبيهات ارتفاع وانخفاض سكر الدم مع فترة راحة تكرار 15 دقيقة + ارتفاع السكر + انخفاض السكر + السكر في ارتفاع + السكر في انخفاض + متوقع خلال 15 دقيقة: %s + + + فترة التحديث + 30 ثانية + دقيقة + دقيقتان + 5 دقائق + الإصدار %s + يجب أن يبدأ بـ http:// أو https:// + diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml new file mode 100644 index 0000000..5f843b5 --- /dev/null +++ b/app/src/main/res/values-es/strings.xml @@ -0,0 +1,60 @@ + + + AutoSugar + + + Glucosa en sangre + Tendencia + Cambio + mg/dL + mmol/L + Cambiar fuente + Cargando… + Error al obtener datos + Reintentar + Ninguna fuente configurada.\nAbre AutoSugar en tu teléfono para añadir una fuente de Nightscout. + 3h + ahora mismo + hace %d min + Lectura: %s + Recibido: %s + + + Ajustes + Añadir fuente + Guardar + Eliminar + Editar + Probar conexión + Nombre para mostrar + URL de Nightscout (p. ej. https://mynb.herokuapp.com) + Token de API + Unidad de glucosa + Añadir fuente + Editar fuente + ¡Conectado! Glucosa actual: %1$s %2$s + Conexión fallida: %1$s + Fuente guardada. + Fuente eliminada. + Sin fuentes aún.\nPulsa + para añadir tu URL de Nightscout. + Icono de pestaña + + + Alertas de glucosa + Alertas de glucosa + Alertas de glucosa alta y baja con intervalo de repetición de 15 minutos + Glucosa alta + Glucosa baja + Glucosa en tendencia alta + Glucosa en tendencia baja + Predicción en 15 min: %s + + + Intervalo de actualización + 30 seg + 1 min + 2 min + 5 min + Versión %s + Debe comenzar con http:// o https:// + diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml new file mode 100644 index 0000000..ae8eca5 --- /dev/null +++ b/app/src/main/res/values-fr/strings.xml @@ -0,0 +1,60 @@ + + + AutoSugar + + + Glycémie + Tendance + Variation + mg/dL + mmol/L + Changer de source + Chargement… + Échec de la récupération des données + Réessayer + Aucune source configurée.\nOuvrez AutoSugar sur votre téléphone pour ajouter une source Nightscout. + 3h + à l\'instant + il y a %d min + Lecture : %s + Reçu : %s + + + Paramètres + Ajouter une source + Enregistrer + Supprimer + Modifier + Tester la connexion + Nom d\'affichage + URL Nightscout (ex. https://mynb.herokuapp.com) + Jeton API + Unité de glucose + Ajouter une source + Modifier la source + Connecté ! Glycémie actuelle : %1$s %2$s + Échec de la connexion : %1$s + Source enregistrée. + Source supprimée. + Aucune source.\nAppuyez sur + pour ajouter votre URL Nightscout. + Icône d\'onglet + + + Alertes glycémie + Alertes glycémie + Alertes d\'hyperglycémie et d\'hypoglycémie avec intervalle de répétition de 15 minutes + Glycémie élevée + Glycémie basse + Glycémie en hausse + Glycémie en baisse + Prévision dans 15 min : %s + + + Intervalle d\'actualisation + 30 sec + 1 min + 2 min + 5 min + Version %s + Doit commencer par http:// ou https:// + diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml new file mode 100644 index 0000000..8e6a6b4 --- /dev/null +++ b/app/src/main/res/values-hi/strings.xml @@ -0,0 +1,60 @@ + + + AutoSugar + + + रक्त शर्करा + प्रवृत्ति + परिवर्तन + mg/dL + mmol/L + स्रोत बदलें + लोड हो रहा है… + डेटा प्राप्त करने में विफल + पुनः प्रयास करें + कोई स्रोत कॉन्फ़िगर नहीं है।\nNightscout स्रोत जोड़ने के लिए अपने फ़ोन पर AutoSugar खोलें। + 3h + अभी-अभी + %d मिनट पहले + रीडिंग: %s + प्राप्त: %s + + + सेटिंग्स + स्रोत जोड़ें + सहेजें + हटाएं + संपादित करें + कनेक्शन जांचें + प्रदर्शन नाम + Nightscout URL (उदा. https://mynb.herokuapp.com) + API टोकन + ग्लूकोज़ इकाई + स्रोत जोड़ें + स्रोत संपादित करें + कनेक्ट हो गया! वर्तमान BG: %1$s %2$s + कनेक्शन विफल: %1$s + स्रोत सहेजा गया। + स्रोत हटा दिया गया। + अभी कोई स्रोत नहीं।\nअपना Nightscout URL जोड़ने के लिए + दबाएं। + टैब आइकन + + + ग्लूकोज़ अलर्ट + ग्लूकोज़ अलर्ट + 15 मिनट की पुनरावृत्ति के साथ उच्च और निम्न रक्त शर्करा अलर्ट + उच्च रक्त शर्करा + निम्न रक्त शर्करा + ग्लूकोज़ बढ़ रहा है + ग्लूकोज़ घट रहा है + 15 मिनट में अनुमानित: %s + + + रीफ्रेश अंतराल + 30 सेकंड + 1 मिनट + 2 मिनट + 5 मिनट + संस्करण %s + http:// या https:// से शुरू होना चाहिए + diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml new file mode 100644 index 0000000..cfbd859 --- /dev/null +++ b/app/src/main/res/values-it/strings.xml @@ -0,0 +1,60 @@ + + + AutoSugar + + + Glicemia + Tendenza + Variazione + mg/dL + mmol/L + Cambia sorgente + Caricamento… + Recupero dati fallito + Riprova + Nessuna sorgente configurata.\nApri AutoSugar sul telefono per aggiungere una sorgente Nightscout. + 3h + proprio ora + %d min fa + Lettura: %s + Ricevuto: %s + + + Impostazioni + Aggiungi sorgente + Salva + Elimina + Modifica + Testa connessione + Nome visualizzato + URL Nightscout (es. https://mynb.herokuapp.com) + Token API + Unità di misura + Aggiungi sorgente + Modifica sorgente + Connesso! Glicemia attuale: %1$s %2$s + Connessione fallita: %1$s + Sorgente salvata. + Sorgente eliminata. + Nessuna sorgente.\nPremi + per aggiungere il tuo URL Nightscout. + Icona scheda + + + Avvisi glicemia + Avvisi glicemia + Avvisi per glicemia alta e bassa con intervallo di ripetizione di 15 minuti + Glicemia alta + Glicemia bassa + Glicemia in aumento + Glicemia in calo + Previsto tra 15 min: %s + + + Intervallo aggiornamento + 30 sec + 1 min + 2 min + 5 min + Versione %s + Deve iniziare con http:// o https:// + diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml new file mode 100644 index 0000000..4e0a054 --- /dev/null +++ b/app/src/main/res/values-ja/strings.xml @@ -0,0 +1,60 @@ + + + AutoSugar + + + 血糖値 + トレンド + 変化量 + mg/dL + mmol/L + ソース切替 + 読み込み中… + データの取得に失敗しました + 再試行 + ソースが設定されていません。\nスマートフォンでAutoSugarを開き、Nightscoutソースを追加してください。 + 3時間 + たった今 + %d分前 + 測定値: %s + 受信: %s + + + 設定 + ソースを追加 + 保存 + 削除 + 編集 + 接続テスト + 表示名 + Nightscout URL(例: https://mynb.herokuapp.com) + APIトークン + 血糖単位 + ソースを追加 + ソースを編集 + 接続成功!現在の血糖値: %1$s %2$s + 接続失敗: %1$s + ソースを保存しました。 + ソースを削除しました。 + ソースがありません。\n+をタップしてNightscout URLを追加してください。 + タブアイコン + + + 血糖アラート + 血糖アラート + 15分間隔の繰り返しで高血糖・低血糖アラート + 高血糖 + 低血糖 + 血糖値上昇傾向 + 血糖値下降傾向 + 15分後の予測: %s + + + 更新間隔 + 30秒 + 1分 + 2分 + 5分 + バージョン %s + http:// または https:// で始まる必要があります + diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml new file mode 100644 index 0000000..3134ff1 --- /dev/null +++ b/app/src/main/res/values-nl/strings.xml @@ -0,0 +1,60 @@ + + + AutoSugar + + + Bloedglucose + Trend + Verandering + mg/dL + mmol/L + Bron wisselen + Laden… + Ophalen van gegevens mislukt + Opnieuw proberen + Geen bronnen geconfigureerd.\nOpen AutoSugar op je telefoon om een Nightscout-bron toe te voegen. + 3u + zojuist + %d min geleden + Meting: %s + Ontvangen: %s + + + Instellingen + Bron toevoegen + Opslaan + Verwijderen + Bewerken + Verbinding testen + Weergavenaam + Nightscout-URL (bijv. https://mynb.herokuapp.com) + API-token + Glucose-eenheid + Bron toevoegen + Bron bewerken + Verbonden! Huidige glucose: %1$s %2$s + Verbinding mislukt: %1$s + Bron opgeslagen. + Bron verwijderd. + Nog geen bronnen.\nTik op + om je Nightscout-URL toe te voegen. + Tabpictogram + + + Glucosemeldingen + Glucosemeldingen + Meldingen voor hoge en lage bloedglucose met herhalings-cooldown van 15 minuten + Hoge glucose + Lage glucose + Glucose stijgt + Glucose daalt + Voorspelling over 15 min: %s + + + Verversingsinterval + 30 sec + 1 min + 2 min + 5 min + Versie %s + Moet beginnen met http:// of https:// + diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml new file mode 100644 index 0000000..dc6baf9 --- /dev/null +++ b/app/src/main/res/values-pt/strings.xml @@ -0,0 +1,60 @@ + + + AutoSugar + + + Glicemia + Tendência + Variação + mg/dL + mmol/L + Trocar fonte + Carregando… + Falha ao obter dados + Tentar novamente + Nenhuma fonte configurada.\nAbra o AutoSugar no seu telefone para adicionar uma fonte Nightscout. + 3h + agora mesmo + há %d min + Leitura: %s + Recebido: %s + + + Configurações + Adicionar fonte + Salvar + Excluir + Editar + Testar conexão + Nome de exibição + URL do Nightscout (ex. https://mynb.herokuapp.com) + Token de API + Unidade de glicose + Adicionar fonte + Editar fonte + Conectado! Glicemia atual: %1$s %2$s + Falha na conexão: %1$s + Fonte salva. + Fonte excluída. + Nenhuma fonte ainda.\nToque em + para adicionar sua URL do Nightscout. + Ícone de guia + + + Alertas de glicose + Alertas de glicose + Alertas de glicose alta e baixa com intervalo de repetição de 15 minutos + Glicose alta + Glicose baixa + Glicose tendendo a subir + Glicose tendendo a cair + Previsto em 15 min: %s + + + Intervalo de atualização + 30 seg + 1 min + 2 min + 5 min + Versão %s + Deve começar com http:// ou https:// + diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml new file mode 100644 index 0000000..7a53a76 --- /dev/null +++ b/app/src/main/res/values-zh/strings.xml @@ -0,0 +1,60 @@ + + + AutoSugar + + + 血糖值 + 趋势 + 变化量 + mg/dL + mmol/L + 切换来源 + 加载中… + 数据获取失败 + 重试 + 未配置来源。\n请在手机上打开 AutoSugar,添加 Nightscout 来源。 + 3小时 + 刚刚 + %d 分钟前 + 读数:%s + 已接收:%s + + + 设置 + 添加来源 + 保存 + 删除 + 编辑 + 测试连接 + 显示名称 + Nightscout 网址(例如 https://mynb.herokuapp.com) + API 令牌 + 血糖单位 + 添加来源 + 编辑来源 + 已连接!当前血糖:%1$s %2$s + 连接失败:%1$s + 来源已保存。 + 来源已删除。 + 暂无来源。\n点击 + 添加您的 Nightscout 网址。 + 标签图标 + + + 血糖提醒 + 血糖提醒 + 高低血糖提醒,15 分钟重复间隔 + 血糖偏高 + 血糖偏低 + 血糖呈上升趋势 + 血糖呈下降趋势 + 预计 15 分钟后:%s + + + 刷新间隔 + 30 秒 + 1 分钟 + 2 分钟 + 5 分钟 + 版本 %s + 必须以 http:// 或 https:// 开头 + diff --git a/docs/_config.yml b/docs/_config.yml index ad7db23..1678726 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -5,3 +5,7 @@ theme: minima minima: skin: dark + logo: /assets/logo.png + header_pages: + - install.md + - privacy-policy.md diff --git a/docs/assets/logo.png b/docs/assets/logo.png new file mode 100644 index 0000000..576b242 Binary files /dev/null and b/docs/assets/logo.png differ diff --git a/docs/index.md b/docs/index.md index 92e9263..0731479 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,21 +1,40 @@ --- -layout: home +layout: page title: AutoSugar --- -# AutoSugar +Blood glucose monitoring for Android Auto — see your [Nightscout](https://nightscout.github.io) CGM data at a glance, right on your car's display. -Blood glucose monitoring for Android Auto — see your Nightscout CGM data at a glance, right on your car's display. +Get it on Google Play -[![Get it on Google Play](https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png)](https://play.google.com/store/apps/details?id=de.autosugar){:height="60px"} +[Other installation options →](install) + +## Screenshots + +
+ Glucose monitor — profile 1 + Glucose monitor — profile 2 + Settings — profiles list + Settings — edit profile +
## Features -- Monitor one or multiple Nightscout sources (e.g. yourself and your children) +- Monitor one or multiple [Nightscout](https://nightscout.github.io) sources (e.g. yourself and your children) - Current glucose value, trend arrow, and delta - Configurable glucose alerts -- English and German UI +- Available in English, German, Spanish, French, Dutch, Italian, Portuguese, Arabic, Japanese, Chinese, and Hindi + +## Configuration + +1. **Open AutoSugar** on your Android phone and tap **Add profile**. +2. Enter your [Nightscout](https://nightscout.github.io) URL (e.g. `https://yoursite.herokuapp.com`) and an optional display name. +3. If your Nightscout instance requires authentication, enter your API secret. +4. Set your preferred glucose unit (mg/dL or mmol/L) and alert thresholds. +5. **Connect Android Auto** — AutoSugar will appear in the app launcher on your car's display. + +You can add multiple profiles to monitor different Nightscout sources (e.g. one for yourself and one for your child). Use the profile list in the app to switch or reorder them. ## Source code -AutoSugar is open source. Find the code and report issues on [GitHub](https://github.com/EarMaster/AutoSugar). +Open source — find the code and report issues on [GitHub](https://github.com/EarMaster/AutoSugar). diff --git a/docs/install.md b/docs/install.md new file mode 100644 index 0000000..51824ec --- /dev/null +++ b/docs/install.md @@ -0,0 +1,23 @@ +--- +layout: page +title: Installation +--- + +## Google Play Store + +The easiest way to install AutoSugar. Updates are delivered automatically. + +Get it on Google Play + +## Sideloading (APK) + +If you prefer to install manually or cannot access the Play Store: + +1. Download the latest `app-release.apk` from the [GitHub Releases](https://github.com/EarMaster/AutoSugar/releases) page. +2. On your Android phone, go to **Settings → Apps → Special app access → Install unknown apps** and allow installations from your browser or file manager. +3. Open the downloaded APK and follow the installation prompts. +4. To use AutoSugar with Android Auto, you also need to enable **Unknown sources** in the Android Auto developer settings: + - Open Android Auto → tap the version number in the footer 10 times to unlock developer settings. + - In **Developer settings**, enable **Unknown sources**. + +> **Note:** Sideloaded apps do not receive automatic updates. Check the [releases page](https://github.com/EarMaster/AutoSugar/releases) periodically for new versions.