SShortSingh.
Back to feed

How to Run On-Device LLM Summarization in Android Background Using WorkManager

0
·1 views

A developer tutorial outlines a pattern for integrating Android's WorkManager with a quantized on-device large language model — specifically llama.cpp via JNI — to perform background document summarization reliably. The architecture uses chained Workers in a parallel fan-out and serial reduce pattern, processing documents in roughly 500-token chunks to avoid memory overflows and the 10-minute execution window limit. Model selection is tied strictly to device memory ceilings, with mid-range 6 GB devices recommended to use only sub-1.5B INT4 quantized models for background tasks without foreground promotion. Key WorkManager constraints include setting battery-not-low requirements and using setExpedited to prevent Doze-mode from deferring inference jobs by hours. The guide targets Android API 26+ with WorkManager 2.9+ and applies broadly to llama.cpp, MLC LLM, or MediaPipe LLM Inference API integrations.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Jeston Framework Aims to Unify Scattered TypeScript Full-Stack Conventions

Jeston is a TypeScript framework developed by Kvant that addresses the fragmentation of conventions across rendering, APIs, caching, jobs, and deployment in full-stack systems. The framework establishes explicit boundaries, giving teams a clearer way to understand and reason about the complete runtime. While Jeston defines the contract and supported behaviors, application teams retain responsibility for provider choice, failure handling, and operational decisions. The framework also draws a clear line between stable supported features and experimental or roadmap items, which is intended to simplify adoption and upgrade documentation. Developers are advised to consult the official Jeston repository for current package details before using examples in production environments.

0
ProgrammingDEV Community ·

Cursor Automation vs OpenClaw: A Practical Guide to Choosing the Right AI Agent

Cursor Automation, launched by Cursor in March 2026, is a cloud-based platform that deploys AI agents triggered by events such as GitHub pull requests, Slack messages, or PagerDuty incidents. OpenClaw, created by Peter Steinberger in early 2026, is a self-hosted AI assistant that runs on a user's own machine and connects to messaging apps like WhatsApp, Telegram, and Discord. Cursor Automation is designed for team-wide engineering workflows, offering cloud sandboxes, MCP integrations, and a shared memory system, while OpenClaw prioritizes personal use, local file control, and open-source flexibility. Cursor reports its Bugbot automation runs thousands of times daily and has flagged millions of bugs, highlighting the platform's scale for professional teams. Users with both team automation needs and personal task management can run the two tools in parallel rather than choosing one exclusively.

0
ProgrammingDEV Community ·

IoT Data Quality Challenges Hamper ML Pipelines in Kenya's 2,500-Device Network

A developer managing over 2,500 IoT devices across Kenya encountered persistent data quality issues that prevented reliable machine learning processing. Key problems included sensor drift caused by temperature fluctuations, connectivity gaps that corrupted or lost data entirely, and schema changes that broke preprocessing pipelines. To address these, the team deployed local data caching, automated sanity checks via n8n workflows, and a schema versioning system, collectively reducing data errors by around 30%. Edge computing on Raspberry Pi devices, aided by lightweight LangChain algorithms, helped manage limited processing power and energy constraints. Environmental factors such as dust, humidity, and rain further degraded hardware performance, underscoring the unique infrastructure challenges faced in emerging-market IoT deployments.

0
ProgrammingDEV Community ·

EU Accessibility Standard EN 301 549 to Adopt WCAG 2.2 by Late 2026

The European Accessibility Act currently references EN 301 549 V3.2.1, which is based on WCAG 2.1, but an updated version adopting WCAG 2.2 Level AA is expected to become legally binding when cited in the EU Official Journal, provisionally between late November and mid-December 2026. The new version, V4.1.1, was published by ETSI, CEN, and CENELEC on 2 September 2026 and introduces six additional success criteria covering areas such as consistent help, redundant entry, focus visibility, dragging alternatives, target size, and accessible authentication. One existing requirement, the Parsing criterion (4.1.1), is removed in WCAG 2.2, though it remains enforceable under the current harmonised standard until the transition is complete. Organisations are advised to assess their compliance gaps against both WCAG 2.1 and WCAG 2.2 now, rather than waiting for the official citation date. The legal obligation does not take effect until the new standard is formally cited in the Official Journal, meaning WCAG 2.1 remains the binding benchmark for now.