Intelligent multi-channel automation, message recovery, and background services blueprint.
This technical proposal specifies the design and implementation specifications for the WA Assistant Android application. In today's communication landscape, messaging clients (such as WhatsApp, WhatsApp Business, cloned messaging instances, and Facebook Messenger) have become critical hubs. However, users face recurring pain points: notification overload, inability to filter calls, lost media due to immediate deletions, and lack of location-aware profile configurations.
WA Assistant addresses these needs by establishing a robust, localized secretario daemon on the device. By utilizing core Android APIs (NotificationListener, Accessibility, and CallScreening roles), coupled with a low-impact SQLite database, the app automates replies, blocks distractions, recovers deleted media, and triggers location-based profiles completely offline, keeping user data secure.
The application is built using modern Android engineering practices: Kotlin, Hilt Dependency Injection, Jetpack Navigation, DataStore Preferences, and Room ORM, and operates reliably across SDK levels 26 to 36.
The WhatsApp Deleted Messages Recovery (WRDM) system intercepts and archives conversations in real-time. Operating as part of the background ReplyNotificationService, it captures text logs the moment they hit the status bar. This allows the system to read and store WhatsApp, WhatsApp Business, cloned messaging environments, and Facebook Messenger notifications. The message details (sender, content, package, timestamp) are stored in the Room database, ensuring that even if the sender clicks "Delete for Everyone," a local record is preserved.
For media files (photos, videos, audio notes), the system uses a multi-tier scanning worker. When a notification text indicates media has arrived, the scanner watches the device's storage directory (e.g. /Android/media/com.whatsapp/WhatsApp/Media). If a file is modified within a 5-minute window, it is copied to a secure internal directory (files/media_vault). This local copy is secure and hidden from the standard system media scanner, preventing files from showing up in other apps or galleries.
The Auto-Reply Engine lets you configure automated keyword responders. When an incoming message notification is detected, the engine queries the AutoReplyRule database to find active matching rules. Rules can be configured for exact keyword matches, "contains" matches, or catch-all replies (where an empty keyword matches all incoming messages).
To prevent messaging loops (such as two auto-responders replying to each other), the app uses local preferences to track reply counts. Users can set a limit on the number of replies sent to a single contact, as well as a delay interval before sending. Replies are sent silently in the background by building and firing a Wear OS RemoteInput action on the notification. If the messenger app does not support RemoteInput, the ReplyAccessibilityService acts as a fallback, programmatically opening the chat, pasting the reply, and clicking send.
The Call Rejection module blocks unwanted incoming calls. For cellular connections, the app uses Android's CallScreeningService. Incoming calls are compared against the database blacklist. If a match is found, the call is rejected silently, preventing the phone from ringing, suppressing caller notifications, and bypassing the system call log.
For WhatsApp and VoIP connections, which bypass standard telephony services, the app uses a 6-tier suppression strategy. Upon detecting a WhatsApp call notification, the system immediately silences the ringer via the AudioManager. It then attempts to find and trigger the "Decline" or "Reject" notification action. If the action buttons are missing, the service cancels the notification, snoozes the alert, and uses the Telecom framework to terminate the call. Whitelists and blacklists can be configured using contacts from the system phonebook, and rejected callers can be sent automated SMS replies.
The App Blocker allows you to suppress notifications from selected apps during specific times. Users can pick apps to block using the AppBlockPickerActivity. When a selected app posts a notification, the ReplyNotificationService intercepts it and calls cancelNotification to remove it from the status bar.
Blocked notifications are not lost; they are saved in the BlockedNotification database table. This allows users to review blocked alerts later through the app's notification center. The App Blocker can be enabled globally or tied to specific automation profiles (such as blocking social media apps only during "Study" or "Work" hours).
The Silent Phone Zone module automates ringer settings based on your location. Users can create location boundaries (geofences) by defining a center coordinate (latitude/longitude) and a radius. When the device enters a geofence zone, the app uses the AudioManager to switch the ringer mode to Silent or Do Not Disturb (DND).
When the device exits the zone, the original ringer settings are restored. To ensure this works reliably in the background without draining the battery, the app integrates with Google Play Services' Geofencing API. This allows the system to monitor location transitions efficiently, waking the app only when a boundary is crossed.
The Location Task Reminder module triggers tasks or notes when you arrive at a specific location. Unlike silent zones, which modify system volume, task zones show reminder notifications when entering a boundary (e.g., reminding you of a shopping list when entering a grocery store).
These reminders are managed as geofences prefixed with task_ in the database. When the device crosses the boundary, a background broadcast receiver captures the transition, retrieves the task details, and triggers a high-priority system notification with custom sound and vibration settings.
The App Usage module helps users monitor their screen time. By requesting the PACKAGE_USAGE_STATS permission, the app queries Android's UsageStatsManager to track how long other applications are used.
The gathered data is processed in the background and presented in the AppUsageFragment. The interface displays screen-time charts, app launch counts, and active usage times. This helps users identify apps they might want to block during focus hours.
The Network Data Usage module monitors data consumption. It uses Android's NetworkStatsManager to track both Wi-Fi and mobile data usage for each app package.
Users can set daily or monthly data limits for specific apps. If an app exceeds its limit, the system displays a warning notification. This is particularly useful for tracking background data usage in messaging and social media apps.
The Notification Widget brings app controls to your home screen. Implemented as a AppWidgetProvider, the widget displays recent blocked notifications, active profile status, and quick toggle switches.
The widget updates dynamically. When a notification is blocked, the service sends a broadcast to update the widget layout, keeping the home screen information up-to-date.
The Notification Logger archives blocked notifications in the database. Every intercepted notification is logged in the BlockedNotification table.
This data is used to generate reports in the NotificationsFragment. Users can view total blocked alerts, identify the most active apps, and filter logs by app or contact name.
The Settings module manages app options, security, and data storage. Key features include:
BiometricPrompt API.To coordinate background operations, the application requests the following Android system permissions during onboarding:
| Permission | API Identifier | Category | Purpose & Scope |
|---|---|---|---|
| Notification Access | BIND_NOTIFICATION_LISTENER_SERVICE |
Mandatory | Intercepts notifications to process auto-replies, WRDM message captures, and app blocking. |
| Accessibility Service | BIND_ACCESSIBILITY_SERVICE |
Recommended | Allows keyboard emulation and reply injection for third-party messenger clones. |
| All Files Access | MANAGE_EXTERNAL_STORAGE |
Mandatory | Allows background scanning of WhatsApp media paths to copy files into the secure vault. |
| Call Screening Role | ROLE_CALL_SCREENING |
Optional | Required to silently decline cellular calls from blacklisted contacts. |
| Ignore Battery Limits | REQUEST_IGNORE_BATTERY_OPTIMIZATIONS |
Recommended | Keeps background loops running and avoids Android system memory termination. |
| SMS Send Permission | SEND_SMS |
Optional | Allows sending automated text replies to rejected cellular calls. |
| Location Access | ACCESS_FINE_LOCATION, ACCESS_BACKGROUND_LOCATION |
Optional | Registers geofence silent zones and detects entry/exit coordinates in background. |
| Do Not Disturb Access | ACCESS_NOTIFICATION_POLICY |
Optional | Allows changing ringer/audio streams when entering geofence boundaries. |
Below is a structured registry of the primary UI classes and fragments composing the WA Assistant interface:
The landing onboarding screen of the app. Analyzes the current status of all required permissions and displays them in a checklist UI. Includes Android 13+ restricted settings support for sideloaded APKs, checking Notification Access, Storage, Ignore Battery Limits, SMS, Call Screening, and Location permissions.
The primary navigation container. Hosts fragment swapping (HomeFragment, ToolsFragment, NotificationsFragment, AppUsageFragment) and contains the bottom navigation bar toggles.
A shell activity hosting the primary Jetpack Navigation Controller. It acts as the legacy root navigation carrier for background-initiated flows and deep links.
The main application dashboard page. Displays statistics charts (replies sent, blocked items), current applied automation profile, foreground service status, and master toggle switches.
Presents a grid of automated tools. Serves as the navigation router to sub-features like the Media Vault, Geofences, Call Blocklist, App Blocker, and Notes.
Renders the global App Blocker setup list. Shows currently blocked packages and allows users to append new applications by launching AppBlockPickerActivity.
Displays a searchable list of all installed packages on the system, letting users toggle which apps should have notifications suppressed during specific automation profile schedules.
Shows the suppressed notifications timeline log for a single designated blocked application. Allows checking details, timestamps, and clearing logs.
Displays WhatsApp chats or contacts that are currently muted/blocked. Useful for managing silent messaging lists.
Shows suppressed notifications filtered by sender name. Let's users read notification body texts silently without triggering read receipts in the target applications.
Displays detailed screen time and application statistics. Leverages Android's UsageStatsManager to compute how much time is spent on other applications, showing screen time bar graphs.
Configuration screen to choose which phonebook contacts will be silently blocked and rejected. Integrates with the system address book.
A custom RecyclerView Adapter. Binds whitelisted/blacklisted call rejection rules to visual contact cards, offering toggles and quick delete hooks.
Binds the Android system contacts list to selection list rows, allowing users to search and multiselect contacts easily during rule configuration.
Allows users to configure geolocation-based silent zones. Users can enter a location name, latitude, longitude, and radius, or open MapPickerActivity to pick a location from a map. The input fields are automatically cleared once a location is successfully registered.
Manages location-triggered reminder tasks. Registers task geofences which pop up high-priority alarm notification messages when coordinates match at run-time.
An interactive full-screen map picker allowing the user to select latitude, longitude, and radius parameters visually. Returns picked coordinates back to GeofenceFragment via ActivityResult.
Displays recovered media in a secure gallery layout. Segregates files by category (Images, Videos). Custom viewer layout loads media locally from the app's internal secure storage.
The centralized log view for blocked notifications. Feeds items directly from Room in reverse chronological order, allowing users to inspect what apps were blocked and when.
Displays a list of Automation Profiles (Home, Work, Study, Office, Sleep). Toggles active status switches and routes to details setup.
Detailed configuration editor for a single Automation Profile. Configures triggers (Time range picker, repeat day toggles) and rule toggles (App blocking package additions, call blocking, auto-replies).
Editor screen to insert or update a keyword matching rule. Lets the user define matching keywords, reply content, reply limits per contact, and message delay intervals.
Adapter that binds auto-reply keyword trigger configurations (matching strings, reply texts, delay timings) to lists.
Renders the auto-reply rules setup timeline dashboard. Allows users to switch rules on/off or create new ones for WA Personal, Business, Clone, and Messenger.
The application settings dashboard. Handles global configurations like auto data-cleanup intervals, manual database backups and restores, ringer configurations, security locks, and theme triggers.
A developer guide and onboarding slide layout providing explanations of auto-reply mechanics, WRDM directory targets, and troubleshooting instructions.
Adapts chat conversation summaries (showing unread metrics, sender profile details, last message, and timestamps) to listing recyclers.
The chat timeline view of recovered deleted messages from a selected sender. Highlighted details mark individual texts, and any media attachments (images/videos) are loadable directly from local storage.
Displays a list of WhatsApp chats that have recovered/deleted messages. Categorizes lists based on target channels (Personal, Business, Clone). Launches details view upon selection.
A recyclerview adapter that displays message history logs, rendering custom layout styles depending on media payloads (Photos, Videos, Audios) or text.
Renders sliding tutorial graphics on first-launch showing details of what the app does. Bypassed automatically on subsequent launches.
WA Assistant relies on a local Room SQLite implementation structured into 9 database tables to manage user configurations, message logs, automation rules, and statistics locally:
WA Assistant relies on several key background services to handle notification interception, accessibility controls, call screening, and file observations:
Extends NotificationListenerService. This daemon intercepts incoming status bar notifications. If the notification package matches a designated messaging client (such as WhatsApp, Business, Clones, or Messenger), it triggers the WRDM logger, parses trigger rules, sends automated replies using RemoteInput, and cancels the notification if app-blocking or silent profile rules match.
The core engine keeping background processes active. It runs a persistent foreground notification, ensuring the application remains alive under system memory sweeps. The service manages folder scans, schedules profile tasks, and performs auto-cleanup of logs.
Extends CallScreeningService. Intercepts incoming system calls, compares numbers with the database blacklist, and commands the system to reject calls silently.
Extends AccessibilityService. Implements virtual keyboard emulation, injecting texts programmatically into the input fields of cloned target apps that lack Wear OS RemoteInput support.
Verify the following repositories and dependency layers inside build scripts when compiling the workspace:
The application checks proximity boundaries manually using coordinate distance measurements:
Database transactions should always run on secondary background IO threads using Kotlin Coroutines: