{
  "id": 6597894,
  "title": "Wiring Android's WorkManager to a Quantized On-Device LLM for Background Summarization",
  "url": "https://urgent.news/2026/09/10/wiring-androids-workmanager-to-a-quantized-on-device-llm-for",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-10T14:06:16.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/software_mvp-factory/wiring-androids-workmanager-to-a-quantized-on-device-llm-for-background-summarization-cd4"
  },
  "original_language": "en",
  "account": "This story explains how to integrate a quantized large language model (LLM) with Android WorkManager to perform background summarization reliably. It outlines a pattern for wiring WorkManager to llama.cpp via JNI to handle chunked document summarization without causing memory issues, Doze-mode deferrals, or a frozen UI.\n\nThe article recommends considering the memory constraints on mid-range Android devices when selecting a model tier. Models like Phi-2 require less than 2GB RAM, while larger models exceed available RAM on 6GB devices. It is advised to target sub-1B INT4 models or sub-1.5B INT4 models for background Workers without foreground promotion.\n\nThe tutorial provides guidance on setting constraints, chaining Workers for chunked documents, and promoting to a foreground service when necessary. It emphasizes the importance of setting `setRequiresBatteryNotLow` for inference workloads and setting `setExpedited` for user-triggered summarization to avoid Doze-mode deferrals.\n\nImplementing a foreground service is crucial when using a 3B model, as it provides up to 3 minutes of guaranteed execution time. The article also highlights the importance of avoiding silent OOM kills, profiling peak RSS on minimum-spec devices, and not loading the entire document into a single Worker.\n\nIn conclusion, the story emphasizes that three key decisions determine the success of this architecture: profiling peak RSS to select the appropriate model tier, using chained Workers for documents over 1,500 tokens, and setting `setExpedited` for user-initiated work to avoid Doze-mode deferrals.",
  "summary": "--- title : \" Wiring WorkManager to On-Device LLMs for Background Summarization\" published : true description : \" Schedule quantized LLM inference in Android WorkManager, handle Doze-mode constraints, promote foreground services, and choose the right model tier for mid-range devices.\" tags : android, kotlin, architecture, mobile canonical_url :…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}