{"slug": "safesms-on-device-threat-detection-with-gemma-4-e4b-no-internet-required", "title": "SafeSMS: On-Device Threat Detection with Gemma 4 E4B, no internet required", "summary": "SafeSMS is a privacy-focused Android application that uses the on-device Gemma 4 E4B AI model to detect SMS-based scams, phishing, and spam without sending data to the cloud. The app analyzes incoming messages locally, categorizing them as SAFE, SUSPICIOUS, or SCAM with confidence scores and explanations, ensuring zero latency and complete data privacy. Built with Jetpack Compose, it demonstrates how powerful AI can run efficiently on mobile devices for real-time, offline threat detection.", "body_md": "This is a submission for the Gemma 4 Challenge: Build with Gemma 4\nSafeSMS is a privacy-first Android application designed to protect users from the rising threat of SMS-based scams, phishing, and spam.\nTraditional SMS scanners and spam filters often send your private text messages to the cloud for analysis, creating severe privacy concerns. SafeSMS takes a completely different approach: it brings the intelligence directly to the device.\nBy running a powerful, on-device AI model, it performs real-time threat detection locally on your phone. It monitors incoming messages, categorizes them (SAFE, SUSPICIOUS, or SCAM), provides a confidence score, and explains why a message is dangerous.\nThe app features a sleek dark-mode UI built with Jetpack Compose, including:\nIncoming SMS:\nYour bank account will be blocked. Click immediately: http://bit.ly/xyz\nSafeSMS Output:\n[https://youtu.be/2NhvyiARX1c]\nTo enable real-time, completely private SMS analysis, SafeSMS uses Gemma 4 via LiteRT for on-device inference.\nI selected the E4B model because it perfectly fits mobile and edge environments:\nAbsolute Privacy\nAll SMS data stays on-device. No cloud calls, no data leakage.\nZero Latency & Offline Capability\nMessages are analyzed instantly without any network dependency.\nResource Efficiency\nThe lightweight model runs efficiently inside a background Android service with minimal battery impact.\nStrong Reasoning in a Small Model\nDespite its compact size, the model effectively detects:\nThe model is prompted using a structured classification + reasoning format, enabling it to return:\nThis ensures both accuracy and transparency in predictions.\nSafeSMS follows a fully on-device architecture, ensuring privacy, speed, and reliability.\nIncoming SMS\nProtection Service\nSafeSMS Model Controller\nOn-Device AI Inference\nResult Handling\nUser Interface (Jetpack Compose)\nSafeSMS demonstrates how powerful AI models like Gemma 4 can run entirely on-device, enabling real-world applications that are fast, private, and reliable.\nIt’s a step toward a future where user data never has to leave their device to stay safe.", "url": "https://wpnews.pro/news/safesms-on-device-threat-detection-with-gemma-4-e4b-no-internet-required", "canonical_source": "https://dev.to/parulmalhotraiitk/safesms-on-device-threat-detection-with-gemma-4-e4b-no-internet-required-24p3", "published_at": "2026-05-23 07:16:45+00:00", "updated_at": "2026-05-23 07:32:15.244757+00:00", "lang": "en", "topics": ["artificial-intelligence", "machine-learning", "large-language-models", "cybersecurity", "products"], "entities": ["SafeSMS", "Gemma 4", "LiteRT", "Android", "Jetpack Compose"], "alternates": {"html": "https://wpnews.pro/news/safesms-on-device-threat-detection-with-gemma-4-e4b-no-internet-required", "markdown": "https://wpnews.pro/news/safesms-on-device-threat-detection-with-gemma-4-e4b-no-internet-required.md", "text": "https://wpnews.pro/news/safesms-on-device-threat-detection-with-gemma-4-e4b-no-internet-required.txt", "jsonld": "https://wpnews.pro/news/safesms-on-device-threat-detection-with-gemma-4-e4b-no-internet-required.jsonld"}}