An offline-first, intelligent Android application designed to automate form-filling across any app, browser, or WebView on Android devices using a secure floating overlay and on-device machine learning.
Form filling is a ubiquitous task. Whether registering for academic courses, applying for jobs, registering on portals, or purchasing items on e-commerce sites, users are constantly forced to input identical personal, academic, and professional details.
Universal AI Autofill Assistant eliminates this repetition. By storing personal data locally in structured profiles with custom sections (e.g., identity cards, academic marksheets), the app traverses the active screen's layout hierarchy, matches labels using string metrics and translation heuristics, and populates the forms instantly via a single-tap floating overlay.
- Redundant Data Entry: Repeated entry of names, emails, registration numbers, addresses, and subject-wise grades across numerous platforms.
- Context Fragmentation: Standard autofill APIs (like Android Autofill or Google Autofill) only work in fields that explicitly declare their content types and are unsupported in many third-party apps, custom web browsers, and hybrid WebViews.
- Data Privacy Concerns: Uploading highly sensitive information (like identification numbers, bank accounts, or grades) to cloud-based autofill extensions exposes users to privacy breaches.
- Language Barriers: Forms are often presented in regional languages, rendering standard English-focused autofill tools ineffective.
- Develop a universal form-filling mechanism that works across all applications and WebViews, regardless of third-party platform configuration.
- Keep all sensitive data 100% offline and localized on the device, ensuring absolute user privacy.
- Leverage device-side OCR to scan identity documents and academic marksheets to auto-populate user profiles.
- Implement offline translation and language identification to support multi-lingual form matching.
- Maintain a highly secure sandbox using encrypted stores, biometric prompts, and lockout mechanisms.
- Floating Bubble Interface: A non-intrusive system overlay allowing users to trigger form-filling or switch active profiles directly from any open form.
- Smart Hierarchy Parsing: Accessibility Service-based node traversal that scans field labels, hints, and content descriptions dynamically.
- Document Scanner (OCR): CameraX interface integrated with Google ML Kit Text Recognition to scan ID cards (e.g., PAN, Aadhaar, Driver License, Passport) and academic marksheets to automatically construct profile sections.
- Multi-Language Support: Local Language ID and Translation models that translate regional field labels to English in real-time, allowing English profiles to fill regional language forms.
- Dropdown Option Matching: Automates matching and selection of radio buttons, checkboxes, and standard spinner dropdown lists (e.g. Gender, State, Country, DOB spinners).
- WebView Form Filling: Traverses and populates inputs loaded inside hybrid WebViews, in-app browsers, and standard Chrome contexts.
- Text Expansion Shortcuts: Custom abbreviations (e.g., typing
name-oremail-in a field followed by a bubble tap) to perform instant inline text expansions. - Quick Copy Panel: Foreground notification service (
QuickCopyService) displaying quick buttons to copy Name, Email, and Phone data directly from the system tray. - Local Backups: Complete JSON profile import and export utility for seamless data transfers between devices.
- Robust Security Sandbox: AES-256 protected credentials via
EncryptedSharedPreferences, biometrics validation (BiometricPrompt), local root-detection checks, and automatic 30-second clipboard clearing.
- Language: Kotlin
- UI Framework: Jetpack Compose (Declarative UI) and standard Android XML Layouts (for overlay Windows)
- Architecture: MVVM (Model-View-ViewModel) + StateFlow
- Database: SQLite managed via Room Persistence Library
- ML Engines: Google ML Kit (Text Recognition, Language ID, Translation)
- API Targets: Compile/Target SDK 36, Min SDK 26 (Android 8.0+)
- Device APIs: CameraX, Android Accessibility Service Framework, Android Autofill Framework, Biometric API
The system operates strictly on-device, split into clean layers:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ USER INTERFACE โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ MainActivity (Compose)โ โ Floating Bubble Viewโ โ Camera (Scan)โ โ
โ โโโโโโโโโโโโฌโโโโโโโโโโโโ โโโโโโโโโโโฌโโโโโโโโโโโ โโโโโโโโฌโโโโโโโโ โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BUSINESS LOGIC / SERVICES โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ ProfileViewModel โ โ SmartAccessibilityService โ โ
โ โโโโโโโโโโโโโฌโโโโโโโโโโโโ โโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ
โ LOCAL DATABASE โ โ SECURITY ENGINE โ โ OFFLINE ML KIT โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโโโโ โ
โ โ Room DB (SQLite) โ โ โ โ PinManager โ โ โ โ OCR & Translateโ โ
โ โ Profiles & Custom โ โ โ โ Biometrics โ โ โ โ Language ID โ โ
โ โ Sections (JSON) โ โ โ โโโโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโ โ โโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
These flowcharts outline the application's runtime cycles and parsing engines (located in System Architecture Docs):
graph TD
Start([Launch App]) --> Splash[SplashActivity]
Splash --> PinCheck{PIN Configured?}
%% Security Authorization
PinCheck -- Yes --> SecurityVerify{Verify Identity}
SecurityVerify --> |Biometric/PIN Screen| VerifySuccess{Authorized?}
VerifySuccess -- No --> SecurityVerify
VerifySuccess -- Yes --> MainApp[MainActivity]
%% Onboarding Journey
PinCheck -- No --> Tour[OnboardingActivity]
Tour --> UserInfo[UserInfoActivity]
UserInfo --> PinSet[PinSetupScreen]
PinSet --> MainApp
%% Dashboard Options
MainApp --> Profiles[Profile Management]
MainApp --> Scanner[CameraActivity]
MainApp --> ServiceToggle[Toggle Accessibility Overlay]
Scanner --> |ML Kit OCR Parsing| ScanResult[Profile Section Creation]
ScanResult --> Profiles
ServiceToggle --> OverlayReady[Floating Bubble Rendered]
Figure 1: Global Application Security & Verification Lifecycle
sequenceDiagram
autonumber
actor User
participant Bubble as Floating Bubble Overlay
participant Service as SmartAccessibilityService
participant Parser as Screen Parser (Node Traversal)
participant ML as Local ML Engine (Language ID/Translate)
participant DB as SQLite database (Room)
participant Field as Target App Field
User->>Bubble: Taps Overlay Bubble
Bubble->>Service: Trigger Autofill
Service->>Parser: findAllNodes(rootInActiveWindow)
Parser-->>Service: Return Editable/Clickable Node List
Service->>DB: Fetch Active Profile Data
DB-->>Service: Return profile structure
loop For each input field node
Service->>Service: Retrieve label/hint/ID
opt Label language is non-English
Service->>ML: Detect Language & Translate label string
ML-->>Service: Return Translated English label
end
Service->>Service: matchCustomField()
alt Custom/Section Match Success
Service->>Field: ACTION_SET_TEXT (custom value)
else Custom Match Fail
Service->>Service: matchStandardField()
alt Standard Match Success
Service->>Field: ACTION_SET_TEXT (standard value)
else Standard Match Fail
Service->>Field: No action (log debug)
end
end
end
Service-->>User: Form populated notification
Figure 2: Smart Accessibility Service Traversal and Matching Pipeline
graph LR
Viewfinder[Camera Viewfinder] --> Capture[Capture Button Clicked]
Capture --> FileSaved[Save Frame to Temp Directory]
FileSaved --> OCR[ML Kit TextRecognizer]
OCR --> Parser{Document Classifier}
Parser --> |Matched Regex Patterns| IDCard[Parse ID card: Name, ID, DOB]
Parser --> |Matched School Keywords| Marksheet[Parse Marksheet: Subjects, Marks, Total]
IDCard --> ResultScreen[Verify Results Dialog]
Marksheet --> ResultScreen
ResultScreen --> |User Confirmed| CreateSection[Generate Profile Section]
CreateSection --> SaveDB[Update Room Database]
SaveDB --> MainScreen[Reload Dashboard]
Figure 3: CameraX Frame Capture and ML Kit Document Parsing Pipeline
universal-ai-autofill-assistant/
โโโ .github/ # PR templates and issue configurations
โ โโโ PULL_REQUEST_TEMPLATE.md
โโโ backend/ # Services, security engines, and background tasks
โ โโโ AiFillTileService.kt
โ โโโ AppDatabase.kt
โ โโโ Converters.kt
โ โโโ CopyReceiver.kt
โ โโโ PinManager.kt
โ โโโ QuickCopyService.kt
โ โโโ SmartAccessibilityService.kt
โ โโโ SmartAutofillService.kt
โ โโโ UserProfile.kt
โ โโโ UserProfileDao.kt
โโโ core/ # Application lifecycle, main screens, database setup, and configurations
โ โโโ AppDatabase.kt
โ โโโ Converters.kt
โ โโโ MainActivity.kt
โ โโโ ProfileViewModel.kt
โ โโโ UserProfile.kt
โ โโโ UserProfileDao.kt
โ โโโ build.gradle.kts
โ โโโ gradle.properties
โ โโโ settings.gradle.kts
โโโ frontend/ # UI layouts, colors, theme typography, and Compose Activities
โ โโโ CameraActivity.kt
โ โโโ Color.kt
โ โโโ FeaturesActivity.kt
โ โโโ OnboardingActivity.kt
โ โโโ PrivacyPolicyActivity.kt
โ โโโ SplashActivity.kt
โ โโโ Theme.kt
โ โโโ Type.kt
โ โโโ UserInfoActivity.kt
โ โโโ autofill_item.xml
โ โโโ layout_floating_bubble.xml
โ โโโ layout_profile_item.xml
โ โโโ layout_profile_selector.xml
โโโ database/ # SQL schemas and sample import profiles
โโโ docs/ # User, technical, and architectural docs
โโโ screenshots/ # UI screens & demonstrations
โโโ team/ # Contributions, commit plans, and workflows
โโโ tests/ # Detailed QA test case matrix
For a detailed walkthrough of directory contents, see System Architecture.
Installing and running the app takes less than 2 minutes directly on your phone:
- Download the APK: Copy the compiled release file onto your Android device: app-release.apk.
- Install: Tap the APK file to install it. If prompted with a "Blocked by Play Protect" or "Unknown Source" warning, click "Install Anyway".
- Configure PIN: Open the app, follow the onboarding screens, and define a secure 4-digit PIN to protect your profile details.
- Grant Permissions: Enable Display Over Other Apps (Overlay) and toggle AI Autofill to ON inside Settings โ Accessibility โ Installed Apps.
- Open Android Studio (Hedgehog 2023.1.1 or newer recommended) with compileSdk 36.
- Choose File โ Open, pointing to the cloned root directory of this repository.
- Gradle will synchronize automatically.
- Create a
.envconfiguration file from the Template in the root. - Connect your device via USB (verify USB Debugging is toggled ON).
- Click the green Run icon (or press Shift + F10) to build and deploy.
The application uses local storage to ensure user data remains private.
- Room Database (
AppDatabase, Version 5):- Maintains a single table
UserProfile. - Complex structural mappings (such as
customFieldsMaps and lists of structuredProfileSections) are serialized into JSON strings viaCustomFieldsConverterand saved directly in SQLite text columns.
- Maintains a single table
For schema details, SQL declarations, and mock JSON profile imports, view the Database Documentation.
Below are the actual screenshots captured from the application interfaces:
The QA process comprises:
- Unit Verification: Validates matching algorithms, translation buffers, configuration parsing, and PIN lockout sequences (located in Test Cases).
- UI Testing: Jetpack Compose UI layout tests verifying dialog actions, menu toggles, and edit fields.
- On-Device Diagnostics: Running Accessibility tree captures to evaluate performance and memory footprints during continuous page traversal.
Review complete validation scenarios in Test Cases Matrix and metrics in Test Results.
- Managed app architecture (MVVM) and navigation.
- Developed Room Database, data models, and JSON converters.
- Handled Gradle build configuration and project setup.
- Designed onboarding and splash screens with animations.
- Developed app themes, colors, and typography.
- Created floating bubble, profile selector, and profile list UI layouts.
- Built document scanning with Google ML Kit OCR.
- Developed profile creation and management screens.
- Implemented Privacy Policy and autofill-related UI components.
- Developed autofill, text expansion, and accessibility services.
- Built authentication, Quick Settings tile, and clipboard services.
- Integrated security features and conducted Android 14โ16 testing.
- OTP Auto-Detection & Autofill: Listen to incoming SMS notifications to detect verification codes via SMS Retriever APIs and automatically populate input boxes.
- Cloud Sync Integration: Optional, end-to-end encrypted backup systems to sync profiles with cloud lockers (e.g. Google Drive) securely.
- On-Device ML Form Classifier: Use TensorFlow Lite or custom local weights to predict field matching types based on layout coordinate vectors.
- Browser Sync Extension: Synchronize stored credentials locally with desktop browser overlays over a local Wi-Fi connection.
- Android Developers Guide: Accessibility Service API
- Jetpack Compose UI documentation: Compose UI Layouts
- Google Developers: ML Kit Text Recognition Guide
- Android Security: Cryptography and EncryptedSharedPreferences







