Skip to content
AnanthAkshayPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

25 Commits

Folders and files

Repository files navigation

Contexta β€” Connect Β· Understand Β· Transform



Your phone already has everything it needs to help you. Contexta makes it act on it β€” on-device, privately, without asking.

Platform Frontend Backend Hackathon License

πŸ“² Download APK Β Β·Β  🎬 Watch Demo Β Β·Β  πŸ“„ Full Proposal


πŸ“– Table of Contents


🌟 Overview

Contexta is a Personal AI Operating System layer for Android smartphones. It acts as an autonomous agent that continuously reads your physical environment and digital schedule to proactively adjust your phone settings β€” saving you from the cognitive tax of constant manual toggles.

Whether you're stepping into a meeting, walking to a destination, or arriving home after work, Contexta observes, decides, and acts seamlessly in the background β€” with zero cloud dependency, zero latency, and zero compromise on privacy.

Stat Value
⚑ Action Latency < 100ms
🧠 Processing 100% On-Device
☁️ Cloud Calls Zero
πŸ”‹ Battery Overhead Negligible (WorkManager)
πŸ“± Platform Android 10+

⚠️ The Problem

Smartphones are inherently reactive. This creates friction at every step of a user's day:

  • Manual Switching β€” Users must remember to silence their phones before meetings or raise brightness when stepping outdoors.
  • Micro-Distractions β€” The average user makes ~40 minor setting adjustments per day, collectively fragmenting focus and wasting cognitive energy.
  • Rigid Schedules β€” Tools like "Do Not Disturb" operate on fixed time windows, ignoring sudden real-world changes.
  • Context Blindness β€” No native Android feature connects your calendar, movement, and location into a unified, proactive response.

πŸ’‘ The Solution

Contexta introduces a continuous, on-device perception-action loop:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  OBSERVE │────▢│  DECIDE  │────▢│   ACT    │────▢│  LEARN   β”‚
β”‚ Calendar β”‚     β”‚ On-Deviceβ”‚     β”‚  DND /   β”‚     β”‚ Override β”‚
β”‚ WiFi     β”‚     β”‚  Logic   β”‚     β”‚ Volume / β”‚     β”‚ Feedback β”‚
β”‚ Accel.   β”‚     β”‚  + ML    β”‚     β”‚  Apps    β”‚     β”‚  Loop    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. Observe β€” Ingests native Android signals: Calendar events, Accelerometer readings, WiFi SSID.
  2. Decide β€” Classifies user context in real-time using on-device logic (Meeting, Walking, Driving, Home, Away).
  3. Act β€” Triggers system intents: DND mode, sound profiles, app launches.
  4. Learn β€” Adapts instantly to user overrides without retraining or cloud sync.

πŸ“± Screenshots

Full Session Walkthrough β€” Cold Start β†’ Meeting β†’ Walking β†’ Home

1. Initial Dashboard 2. Meeting Detected β†’ DND ON 3. Walking β†’ Maps & Music 4. Home Profile Active
Three detectors idle at launch. 0 actions, HOME OFF, DND OFF. Calendar finds "Sprint Standup" (91% conf). DND instantly enabled. Accelerometer variance > 0.8 (87% conf). Maps & Music offered. SSID "MyHomeWiFi" matches (95% conf). HOME ON, DND ON.
5. Away Mode β€” Office WiFi 6. Home + DND β€” 5 Events 7. Meeting Re-Triggered β€” 6 Events 8. Full Activity Log β€” 8 Events
SSID "OfficeWiFi_5G" ≠ home. Device correctly stays AWAY. HOME confirmed ON. DND still active from earlier meeting. 5 actions. Calendar re-scans every cycle. Consistent DND re-trigger. 6 events. Complete audit: 3× DND, 1× Walk→Music, 2× HOME, 2× AWAY.

πŸ—οΈ System Architecture

Contexta bridges a high-fidelity React Native frontend with a low-latency Android Java Native Engine.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         REACT NATIVE FRONTEND  (Expo Β· TypeScript Β· UI/UX)           β”‚
β”‚                                                                      β”‚
β”‚   ContextDashboard   ActivityLog   OverridePanel   DetectorCards     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  CalendarBridge  β”‚   MovementBridge  β”‚         HomeBridge            β”‚
β”‚  (JSI / RN NM)   β”‚   (JSI / RN NM)  β”‚        (JSI / RN NM)          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚          ANDROID NATIVE SENSOR FUSION ENGINE  (Java)                 β”‚
β”‚                                                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚  MeetingDetector β”‚  β”‚ MovementDetector β”‚  β”‚   HomeDetector   β”‚   β”‚
β”‚  β”‚  CalendarContractβ”‚  β”‚  SensorManager   β”‚  β”‚   WifiManager    β”‚   β”‚
β”‚  β”‚  Β±30min scan     β”‚  β”‚  XYZ variance    β”‚  β”‚   SSID match     β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚           β–Ό                     β–Ό                      β–Ό             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚ MeetingModeCtrl  β”‚  β”‚ MovementAction   β”‚  β”‚ HomeProfileCtrl  β”‚   β”‚
β”‚  β”‚ DND / Silent API β”‚  β”‚ Maps Β· Music     β”‚  β”‚ Volume Β· Media   β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                                      β”‚
β”‚  ╔══════════════════════════════════════════════════════════════╗    β”‚
β”‚  β•‘         WorkManager  (battery-efficient background polling)  β•‘    β”‚
β”‚  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Layer Breakdown

Layer Technology Responsibility
UI Layer React Native 0.73, Expo, TypeScript Dashboard, real-time logs, override controls
Bridge Layer React Native Native Modules (JSI) Bi-directional JSON sync between JS and Java
Detector Layer Android Java Reads raw sensors; outputs classified context
Action Layer Android Intents & APIs Executes system-level changes (DND, volume, app launch)
Scheduler Android WorkManager Battery-safe background polling; avoids aggressive Wakelocks
Backend Spring Boot 3 Rule configuration, telemetry storage, future ML model serving

🧠 Intelligent Context Pipelines

Pipeline 1 Β· Meeting Context (Calendar NLP)

CalendarContract ──▢ Β±30min window scan ──▢ Keyword match
                                              (Meeting / Call / Standup)
                                                    β”‚
                                                    β–Ό
                                   ACTION_INTERRUPTION_FILTER_PRIORITY
                                        (DND ON Β· Ringer Silenced)
  • Sensor: Android CalendarContract provider
  • Window: Β±30 minutes from current time
  • Keywords: Meeting, Call, Standup, Interview, Review
  • Confidence: Percentage match (e.g., 91%)
  • Action: NotificationManager.ACTION_INTERRUPTION_FILTER_PRIORITY + silent ringer

Pipeline 2 Β· Kinetic Context (Accelerometer Math)

SensorManager (SENSOR_DELAY_NORMAL)
        β”‚
        β–Ό
XYZ magnitude vector ──▢ Sliding variance window
                                β”‚
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          var > 3.0                          var > 0.8
               β”‚                                 β”‚
               β–Ό                                 β–Ό
           DRIVING                           WALKING
       Launch Google Maps               Launch Music App
  • Sensor: SensorManager.SENSOR_DELAY_NORMAL (TYPE_ACCELEROMETER)
  • Math: variance = Ξ£(|magnitude βˆ’ mean|Β²) / n over a sliding window
  • Thresholds: Variance > 3.0 β†’ Driving Β· Variance > 0.8 β†’ Walking
  • Confidence: Percentage (e.g., 87%)
  • Action: Fires Android Intent to launch Maps (Driving) or Spotify/Music (Walking)

Pipeline 3 Β· Location Context (WiFi Geofencing)

WifiManager.getConnectionInfo()
        β”‚
        β–Ό
Current SSID ──▢ Compare with stored Home SSID
                        β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       MATCH                       NO MATCH
          β”‚                            β”‚
          β–Ό                            β–Ό
    Profile β†’ HOME               Profile β†’ AWAY
 (normalize volumes,          (office-appropriate
  lift app restrictions)        settings retained)
  • Sensor: WifiManager.getConnectionInfo() β€” no GPS required
  • Logic: String-matches current SSID against user-configured home network
  • Confidence: Fixed 95% (SSID uniqueness assumption)
  • Home Action: Normalizes ringer, lifts notification restrictions, applies comfort media settings
  • Away Action: Retains DND-compatible office profile; conserves battery

πŸ›  Tech Stack

Area Technology
Mobile Frontend React Native 0.73, Expo, TypeScript
UI Design Custom Glassmorphism Β· Tailwind-style utilities
Native Engine Android Java (API 29+)
Background Jobs Android WorkManager
Sensor APIs CalendarContract, SensorManager, WifiManager
System APIs NotificationManager, AudioManager, Intent
Backend Spring Boot 3, Java 17
Build Gradle 8, EAS Build

πŸ“ Project Structure

Contexta/
β”œβ”€β”€ android/                      # Android native module (Java)
β”‚   └── app/src/main/java/
β”‚       β”œβ”€β”€ detectors/
β”‚       β”‚   β”œβ”€β”€ MeetingDetector.java
β”‚       β”‚   β”œβ”€β”€ MovementDetector.java
β”‚       β”‚   └── HomeDetector.java
β”‚       β”œβ”€β”€ controllers/
β”‚       β”‚   β”œβ”€β”€ MeetingModeController.java
β”‚       β”‚   β”œβ”€β”€ MovementActionController.java
β”‚       β”‚   └── HomeProfileController.java
β”‚       └── bridges/
β”‚           β”œβ”€β”€ CalendarBridge.java
β”‚           β”œβ”€β”€ MovementBridge.java
β”‚           └── HomeBridge.java
β”œβ”€β”€ frontend/                     # React Native / Expo app (TypeScript)
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ ContextDashboard.tsx
β”‚   β”‚   β”œβ”€β”€ DetectorCard.tsx
β”‚   β”‚   β”œβ”€β”€ ActivityLog.tsx
β”‚   β”‚   └── OverridePanel.tsx
β”‚   └── services/
β”‚       β”œβ”€β”€ CalendarService.ts
β”‚       β”œβ”€β”€ MovementService.ts
β”‚       └── HomeService.ts
β”œβ”€β”€ backend/                      # Spring Boot 3 (Java)
β”‚   └── src/main/java/
β”‚       β”œβ”€β”€ config/
β”‚       β”œβ”€β”€ controller/
β”‚       └── service/
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ logo.png                  # Contexta brand logo
β”‚   └── screenshots/              # App screenshots (8 screens)
β”‚       β”œβ”€β”€ dashboard_initial.jpeg
β”‚       β”œβ”€β”€ meeting_cold_start.jpeg
β”‚       β”œβ”€β”€ walking_detection.jpeg
β”‚       β”œβ”€β”€ home_detection_home.jpeg
β”‚       β”œβ”€β”€ home_detection_away.jpeg
β”‚       β”œβ”€β”€ home_profile_active.jpeg
β”‚       β”œβ”€β”€ meeting_detection_active.jpeg
β”‚       └── activity_log_full.jpeg
β”œβ”€β”€ docs/                         # Architecture diagrams
β”œβ”€β”€ Contexta-Release.apk          # Prebuilt release APK
β”œβ”€β”€ Contexta_Demo.mp4             # Demo walkthrough video
β”œβ”€β”€ Contexta_Openclaw.pdf         # Full hackathon proposal
└── README.md

πŸ›‘οΈ Privacy & Performance

Principle Implementation
Zero Cloud Processing All detection logic runs 100% on-device. No calendar events, GPS data, or sensor telemetry are ever transmitted externally.
No Persistent Storage Sensor readings are processed in-memory and discarded immediately after classification.
Negligible Battery Impact Android WorkManager with batched tasks and passive listeners β€” no aggressive CPU Wakelocks.
Sub-100ms Latency Native Java execution eliminates JS-bridge round-trips for time-critical actions.
Offline Ready Works with zero internet connection. All intelligence is pre-compiled on the device.

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • Android Studio (Flamingo or later)
  • Java 17
  • Expo CLI: npm install -g expo-cli

Run the Frontend

git clone https://github.com/AnanthAkshay/Contexta.git
cd Contexta/frontend
npm install
npx expo run:android

Build the Native Android Module

cd Contexta/android
./gradlew assembleRelease

Run the Backend

cd Contexta/backend
./mvnw spring-boot:run

Install the Prebuilt APK

adb install Contexta-Release.apk

Grant permissions on first launch: Calendar, Physical Activity, and Nearby WiFi Devices.


πŸ‘¨β€πŸ’» Team

Team Beta Onepiece β€” M.S. Ramaiah Institute of Technology, Bengaluru

Name Role
Akshay A Team Lead Β· Frontend (React Native)
Aaditya V Backend (Spring Boot)
Tejas M UI/UX Design
H M Pranav Database & Integration

Submitted for the OpenClaw Hackathon by Samsung Prism 2026 β€” Daily Utility Track.


Contexta

Made with ❀️ in Bengaluru  ·  M.S. Ramaiah Institute of Technology

⚑ On-device Β Β·Β  🧠 No cloud Β Β·Β  πŸ“΄ Offline ready

.....

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages