惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
IT之家
IT之家
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
The Register - Security
The Register - Security
C
Cyber Attacks, Cyber Crime and Cyber Security
S
SegmentFault 最新的问题
Engineering at Meta
Engineering at Meta
Know Your Adversary
Know Your Adversary
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
WordPress大学
WordPress大学
C
CXSECURITY Database RSS Feed - CXSecurity.com
F
Fox-IT International blog
C
Cybersecurity and Infrastructure Security Agency CISA
P
Privacy & Cybersecurity Law Blog
雷峰网
雷峰网
大猫的无限游戏
大猫的无限游戏
F
Future of Privacy Forum
阮一峰的网络日志
阮一峰的网络日志
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Recorded Future
Recorded Future
P
Proofpoint News Feed
O
OpenAI News
C
CERT Recently Published Vulnerability Notes
E
Exploit-DB.com RSS Feed
Spread Privacy
Spread Privacy
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
罗磊的独立博客
V
V2EX - 技术
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Blog of Author Tim Ferriss
N
Netflix TechBlog - Medium
AWS News Blog
AWS News Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
李成银的技术随笔
C
Cisco Blogs
SecWiki News
SecWiki News
Application and Cybersecurity Blog
Application and Cybersecurity Blog
L
LINUX DO - 热门话题
B
Blog RSS Feed
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
Latest news
Latest news
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
J
Java Code Geeks

DEV Community

apt-mark hold doesn't pin versions — how it nearly removed OpenSSH across our fleet Getting Started with AWS — A Beginner Friendly Introduction I Built a Free Metal Weight Calculator — Here's the Math Behind It From Half Baked Repos to GitHub Glory: How I Am Finishing My Ambitious Ten App Masterpiece Everyone's Talking About Gemini 3.5 Flash. The Real Story at Google I/O 2026 Was a Skill File. Enhancing the AI Blog System: SQLite Support and Streamlined Publishing Features I Fine-Tuned Gemma 4 on an Emotion Dataset Using a Single GPU Omnichannel inventory in D365: DOM + the Inventory Add-in File-Drop Automations: SFMC Pattern for Daily Imports Regression Testing in Agile: How to Test Without Slowing Down Your Sprints I build projects and manage teams without a single call Making a Calculator UI with HTML5 and CSS3 Full Next.js + Node.js + PostgreSQL Interview Task Setup Google’s Gemini Coding Demos Revealed the Slow Death of “Blank Page Programming” Verification Activity: SFMC Guard Against Empty Files Integrating Shopify with external systems: MVP connection choices Beyond RAG: Architecting Local Long-Context Pipelines with Gemma 4's 31B Dense Model KloudAudit vs AWS Cost Explorer: Why I Stopped Using Cost Explorer for Waste Detection Telegram: API bot access token Gemma 4 at the Edge AasPass: A lightweight, local-first password vault for developers Why Local AI Was the Real Winner of Google I/O 2026 (An Insider’s Take) Laravel Google Drive Filesystem: Unlimited Cloud Storage with Familiar Syntax When not to build an AI agent (and what to ship instead) What a real Sanity CMS development services proposal looks like Why hybrid search is the boring default we keep recommending I kept improving my .NET order pipeline after a CTO left feedback. Here is where it ended up. Why Developers go behind Linux ? Does Front End need HTML, CSS? - Part - 2 From Prompts to Action: What Gemini 3.5 Flash and the Agentic Stack Mean for Developers Does Front End need HTML, CSS? - Part - 1 The real attack surface for AI coding agents is the config file Chai aur SQL — A Beginner's Journey into Databases Find Your Route Source Score: Continuing Exploration of LLM Usage in Automated Workflows Tried using the Claude Platform on AWS Your Node.js Server is Using Just One CPU. Here's How to Fix It. 🚀 Google Antigravity 2.0 Quietly Changes What It Means to Be a Software Engineer Environment variables vs connection references in Power Platform Multi-BU D365 environment: single tenant, multiple LEs AI API Integration Testing Checklist for Multi-Model Apps ORA-00203 오류 원인과 해결 방법 완벽 가이드 Designing a Data Extension in SFMC: The Four Decisions First Kayrol — Day 0: Building AI highlight reels for athletes (in public) The Agony of Over-Engineered Operators: Why Simplicity Saved Our Treasure Hunt Engine Business Rules vs Power Automate vs Plugin: pick one Dataverse virtual tables on SQL: three latency patterns Comunicación y sincronización entre procesos distribuidos I let Gemma 4 analyze my credit card statements so I wouldn't have to Faithfulness gate: the agent layer most teams skip Centralized procurement D365: global address book + vendors Why I Can't Stop Thinking About Google's New A2A Protocol Perovskite cell scaps simulation analysis ¿Qué significan esas letras del CVSS? Guía para entenderlo de una vez scrcpy Integration in a Tauri App — Android Screen Mirroring on Mac Shopify theme editor: design tokens merchants can edit Dataverse security restructure: lessons applied too late Floatkit is live now!!! SimGemma: Democratizing STEM Education with Offline-First AI Simulations What to monitor in an AI agent before you launch (and after) The precedence rule deserves a name Diffusion Language Models Are Here: Deep Dive into NVIDIA's Nemotron-Labs DLM Architecture [Boost] I Still Remember the Day Our Server Stall Almost Killed the Product Launch AI Agents Need More Than Fact-Checking Evaluation & Benchmark Results 5 things `flutter_gemma` doesn't tell you about shipping Gemma 4 on Android How I Indexed 2,000 Claude Code Skills (And What the Install Data Says About AI Coding in 2026) Architecting Instant Micro-Loans: Data Pipelines and KYC Automation Bulk Rename Files from the Command Line with Python Virtual SOC Analyst This project was an absolute blast to build for the Hermes Agent Challenge. If you found the architecture layout or the local automation breakdown helpful, please drop a ❤️ or a 🦄 on the post! Let me know if you want me to write a follow-up guide specifi How I built a fully offline AI assistant on Android with Gemma 4 E2B How I Got Users to Willingly Wait 1 Minute for an API Call (Without Over-Engineering) What Training Exists for Security Professionals Learning AI and Data Science? Easier Bets to Get Early Customer Validation and VC Attention django-deploy-probes — deployment probe endpoints for Django AI Won’t Replace Developers. Weak Thinking Will. Building Micro Agents as Production-Grade Microservices Why Open-Weight Models Like Gemma 4 Are the Future of Secure Backend Architecture I lost 3 enterprise clients in one night because of a GitHub repo. So I built a tool to make sure it never happens again. Building a Local AI SOC Analyst on an M1 MacBook Pro Carelo: A Modern Dual-Pane File Manager for Linux AI API Pricing in 2026: What You Actually Pay for GPT-5.5, Claude Opus, Gemini, and 20+ Models I Built a Free Offline-First Event Operations Platform at 13. Here's Why the Architecture Is Different. I Built an AI Tools Directory. These 10 Lessons Hurt the Most. The "Disappearing Zero": Handling Numeric Inputs in React Native Forms I Finished My Local AI Coding Agent After 5 Months — Eve Agent V2 Unleashed published Neuropsychology: What Brain Damage Reveals About the Mind Shipping Gemma 4 speech recognition in a Windows .NET desktop app: a 5-variant model-selection tour Engineers Don’t Fail Technical Interviews Because They’re Bad at Tech — They Fail Because They Ignore Communication The 20% of ML theory that earns its keep in production WeiQi - (Go) game based productivity tool Diário de dev #1: o que 15 minutos desbloqueou 远程安装及部署应用 · 用户配合指南 The Complete Guide to API Design in 2026: REST, GraphQL, and tRPC in Production 🐍 Flask Python Structured Logging — What Most Miss in Production CSS in 2026: Container Queries, Cascade Layers, and the End of Utility-Class Bloat TypeScript 5.5 — The Features That Actually Matter for Production Code Database Migration Strategies That Actually Work in Production
Aasa: The Phone That Finally Notices
naveen g · 2026-05-24 · via DEV Community

This is a submission for the Gemma 4 Challenge: Build with Gemma 4

What I Built

Aasa is a voice-first, local-first safety companion for elders living alone. It runs entirely on a Pixel-class Android phone, with Gemma 4 doing the conversational reasoning on-device.

The product is grounded in a 2022 peer-reviewed study (Kwan & Tam, IJERPH) of 47 older adults living alone in poverty. The dominant fear they reported was not death,it was "What if I die and no one notices?" Aasa is built to be the thing that finally notices, without stripping the elder's autonomy.

Concretely, Aasa handles:

  • Daily Heartbeat & Wellness check : watches for a single tap, conversation, or spoken word each day. If the morning passes in silence, it prepares a check-in to a trusted contact. Never auto-sends.
  • Document Reader (multimodal) : point the camera at a hospital bill, government letter, or scam mail. On-device OCR feeds the image's text to Gemma 4, which returns: what it is, what it's asking, what to worry about, what to ignore. The page never leaves the table.
  • Medicine Lens (multimodal) : photograph a pill strip; OCR + Gemma 4 produce a conservative safety receipt with duplicate-dose warnings against the local medication log.
  • Grounded medication & memory : "Did I take my medicine today?" reads from a Room database row, not from model hallucination. Family facts ("Ananya's birthday is May 12") persist locally.
  • Scam & Fraud Shield : flags urgency, gift-card asks, and "don't tell family" patterns in respectful, non-shaming language.
  • Safety triage with deferred confirmation"I cannot breathe" prepares an ACTION_DIAL card. The elder still taps call. Aasa never holds CALL_PHONE.
  • Mobility Shield & Fall Triage : short on-device sensor checks. Confidence, not diagnosis.
  • Morning Briefing : Health Connect when available, honest "Demo data — no wearable connected" pill when not.

The core design rule across every feature: AI prepares help. The elder confirms.

Demo

📺 3-minute submission video (canonical cut): [https://www.youtube.com/watch?v=_5nvdQms7d4]

Code

🔗 GitHub: https://github.com/navng0405/aasa **

Repository layout:

aasa/
├── Aasa/                    # Active Android app (Kotlin, Compose, Room, LiteRT-LM)
├── aasa-gemma-server/       # Optional Mac FastAPI→Ollama dev fallback bridge
├── AasaGemmaBridgePoc/      # Legacy PoC, not active
└── AASA_PROJECT_OVERVIEW.md # Full architecture + demo doc

Enter fullscreen mode Exit fullscreen mode

Key entry points for reviewers:

  • agent/AgentOrchestrator.kt — single entry for every turn; runs deterministic safety overrides before trusting the model.
  • model/GemmaRouter.kt + model/OnDeviceGemmaRunner.kt — LiteRT-LM integration; on-device by default.
  • model/OnDevicePromptBuilder.kt — strict JSON contract the model must return (tool, intent, riskLevel, arguments, assistantResponse).
  • tools/ — 13 local tools. None of them can dial, text, or alert directly; they return ToolResult payloads the UI renders as confirmable action cards.
  • document/DocumentReaderAnalyzer.kt & medicine/MedicineLensAnalyzer.kt — multimodal OCR → Gemma reasoning pipelines.

To run:

cd Aasa
./gradlew :app:installDebug
# Side-load the model (not bundled in APK):
adb push gemma-4-E2B-it.litertlm \
  /sdcard/Android/data/com.aasa.eldercare/files/models/

Enter fullscreen mode Exit fullscreen mode

Model: gemma-4-E2B-it.litertlm from litert-community/gemma-4-E2B-it-litert-lm.

How I Used Gemma 4

Model chosen: Gemma 4 E2B (Small Sizes, ~2B effective parameters)

Running via LiteRT-LM 0.11.0 on Android, side-loaded as a .litertlm artifact, with an optional FastAPI→Ollama Mac bridge as a developer fallback only.

Why E2B was the right tool for this job

The challenge brief asks for intentional model selection. For an elder-care safety companion, the decision wasn't close — E2B was the only honest choice, and here's the reasoning:

Requirement of the product What it forces in the model Why E2B fits
The phone of an elder living alone is the worst possible time to depend on a network. A scam call at 9pm, a fall at 3am, a hospital bill on a Sunday — none of these can wait for a cloud round-trip or a working Wi-Fi router. Must run fully offline on a Pixel-class device, with no degraded fallback path. E2B is purpose-built for "ultra-mobile, edge, and browser deployment (e.g., Pixel)." A 31B dense or 26B MoE model would have required a server, which would have broken the entire trust model.
Personal medical, family, and scam-message data must never leave the device. This isn't a marketing line — it's why the elder's daughter can recommend the app. Inference must happen on the same device that holds Room storage. E2B fits comfortably in the memory and thermal envelope of a Pixel 4a/6a. The user's bill photo, the granddaughter's birthday, the scam SMS — none of it touches a server.
Latency must feel like a conversation, not a query. Elders abandon apps that pause. Sub-2-second first-token latency on commodity hardware. E2B delivers this on-device. A larger Gemma 4 variant would have meant either a server (breaks rule #1) or unusably slow local inference.
The model is the conversational shape; deterministic local rules own safety. Aasa's AgentOrchestrator runs keyword-based overrides before the model's action is dispatched — for fall, scam, medication, and emergency phrases. The model needs to be good enough at intent + tool selection + tone, not a doctor or a lawyer. E2B is more than capable of: (a) emitting a structured JSON action, (b) writing warm, plain-language replies, and (c) summarizing OCR'd documents. We don't need 31B-grade world knowledge because the safety facts live in deterministic code and Room.
Multimodal document/medicine understanding without sending images to a cloud. A model small enough to pair with on-device ML Kit OCR and still respond in seconds. E2B handles the OCR-extracted text reasoning step locally. The pipeline is: camera → ML Kit OCR on-device → E2B reasoning on-device → safety receipt. The image never leaves the phone.

What Gemma 4 actually does in the codebase

Gemma 4 E2B is doing real, load-bearing work on every turn:

  1. Intent + tool routing. Given the elder's raw utterance ("I feel weak and missed my medicine"), Gemma emits a JSON object with intent, riskLevel, tool, arguments, and assistantResponse. This drives which of the 13 tools runs.
  2. Tone shaping. Aasa's voice — calm, non-shaming, never diagnostic — comes from Gemma's reply text, constrained by the prompt contract in OnDevicePromptBuilder.kt.
  3. Document & medicine reasoning. After ML Kit OCRs a bill or pill strip, Gemma 4 produces the four-section summary (what it is / what it's asking / what to worry about / what you can ignore) and the medicine safety receipt.
  4. Scam pattern explanation. Deterministic keyword scanning catches gift-card/urgency phrases; Gemma 4 explains them in respectful language so the elder is informed without being shamed.
  5. Companion replies. When the elder says "I feel lonely today," Gemma 4 generates the gentle reply and offers the trusted-contact action card — but never auto-sends it.

What E2B unlocked

Picking the smallest Gemma 4 variant wasn't a compromise — it was the enabling constraint that let Aasa make three promises it couldn't have made with a bigger model:

  1. It works on the elder's existing phone. No second device, no cloud account, no monthly subscription.
  2. The data stays home. Medical context, family memories, and scam messages never leave the device. That is the product.
  3. It works at 3am with no Wi-Fi. Which, for an elder living alone, is the only deployment scenario that actually matters.

Honest limits

  • The model is side-loaded via adb, not downloaded in-app (hackathon scope).
  • I use prompt-engineered JSON rather than native constrained tool calling — a deliberate trade-off so the same prompt contract works for both the on-device runner and the optional Mac bridge.
  • Deterministic local rules outrank the model on safety-critical phrases. If Gemma says "low risk" but the user said "I cannot breathe," the local rule wins. This is by design, not a workaround.

Grounding study: Kwan, C. & Tam, H. C. (2022). "What If I Die and No One Notices?" A Qualitative Study Exploring How Living Alone and in Poverty Impacts the Health and Well-Being of Older People in Hong Kong. Int J Environ Res Public Health, 19(23), 15856. PMID 36497930.