Skip to content

shrirampai3000/RakshaApp

Repository files navigation

Raksha - Companion Care System

A native Android app built with Kotlin and Jetpack Compose for elderly and disabled individuals, featuring real-time health monitoring via Bluetooth Low Energy (BLE) connectivity with a custom wearable pendant.

Features

🏥 Health Monitoring

  • Real-time Vitals: Heart rate and SpO₂ monitoring
  • Fall Detection: Automatic fall detection with alerts
  • Live Dashboard: Real-time display of health metrics
  • Data Storage: Local storage of vitals data using Room database

📱 Dual Mode Operation

  • User Mode: For elderly/disabled individuals
    • Simple vitals display
    • SOS emergency button
    • Voice assistant integration
  • Companion Mode: For caregivers/family members
    • Remote vitals monitoring
    • Vibration therapy control
    • Emergency contact management

🔗 BLE Connectivity

  • Device Pairing: Automatic scanning and pairing with Raksha pendant
  • Real-time Data: Continuous monitoring of sensor data
  • Connection Management: Robust connection handling and reconnection

🗣️ Voice Assistant

  • Speech Recognition: Built-in Android SpeechRecognizer
  • Text-to-Speech: Voice responses for accessibility
  • Health Queries: Natural language health monitoring queries

⚙️ Settings & Configuration

  • Emergency Contacts: Manage emergency contact list
  • Sampling Intervals: Configurable data collection frequency
  • Theme Support: Light/dark theme toggle
  • Notifications: Customizable alert settings

Architecture

The app follows MVVM (Model-View-ViewModel) architecture with the following components:

Data Layer

  • Models: VitalsData, LiveVitals, UserSettings
  • Repository: VitalsRepository - coordinates data operations
  • Local Storage: Room database for vitals data
  • Settings: DataStore for user preferences

Domain Layer

  • BLE Service: BleService - handles Bluetooth Low Energy communication
  • Data Access: VitalsDao - database operations
  • Settings Management: SettingsDataStore - preferences storage

Presentation Layer

  • ViewModels: DashboardViewModel, SettingsViewModel, OnboardingViewModel, ChatbotViewModel
  • UI Screens: Jetpack Compose screens for all app features
  • Navigation: Navigation Compose for screen management

Dependency Injection

  • Hilt: For dependency injection throughout the app
  • Modules: AppModule - provides all dependencies

Technology Stack

  • Language: Kotlin
  • UI Framework: Jetpack Compose
  • Architecture: MVVM with Repository pattern
  • Dependency Injection: Hilt
  • Database: Room with DataStore
  • Navigation: Navigation Compose
  • Bluetooth: Android BLE APIs
  • Voice: Android SpeechRecognizer
  • Build System: Gradle with Kotlin DSL

Setup & Installation

Prerequisites

  • Android Studio Arctic Fox or later
  • Android SDK 24+ (API level 24)
  • Kotlin 2.0.21+
  • Android Gradle Plugin 8.11.1+

Building the App

  1. Clone the repository
  2. Open the project in Android Studio
  3. Sync Gradle files
  4. Build and run on a device with BLE support

Required Permissions

The app requires the following permissions:

  • BLUETOOTH_SCAN - For discovering BLE devices
  • BLUETOOTH_CONNECT - For connecting to BLE devices
  • ACCESS_FINE_LOCATION - Required for BLE scanning
  • RECORD_AUDIO - For voice assistant functionality

BLE Device Specification

The app is designed to work with a custom Raksha pendant that implements the following BLE services:

Service UUID: 0000180d-0000-1000-8000-00805f9b34fb (Heart Rate Service)

Characteristics:

  • Heart Rate: 00002a37-0000-1000-8000-00805f9b34fb
  • SpO₂: 00002a38-0000-1000-8000-00805f9b34fb
  • Fall Detection: 00002a39-0000-1000-8000-00805f9b34fb
  • Vibration Control: 00002a3a-0000-1000-8000-00805f9b34fb

Project Structure

app/src/main/java/com/example/raksha/
├── data/
│   ├── bluetooth/
│   │   └── BleService.kt
│   ├── local/
│   │   ├── RakshaDatabase.kt
│   │   ├── VitalsDao.kt
│   │   ├── SettingsDataStore.kt
│   │   └── Converters.kt
│   ├── model/
│   │   ├── VitalsData.kt
│   │   └── UserSettings.kt
│   └── repository/
│       └── VitalsRepository.kt
├── di/
│   └── AppModule.kt
├── ui/
│   ├── navigation/
│   │   └── NavGraph.kt
│   ├── screens/
│   │   ├── DashboardScreen.kt
│   │   ├── OnboardingScreen.kt
│   │   ├── SettingsScreen.kt
│   │   └── ChatbotScreen.kt
│   └── viewmodel/
│       ├── DashboardViewModel.kt
│       ├── OnboardingViewModel.kt
│       ├── SettingsViewModel.kt
│       └── ChatbotViewModel.kt
├── util/
│   └── PermissionHandler.kt
├── MainActivity.kt
└── RakshaApplication.kt

Key Features Implementation

BLE Connectivity

  • Automatic device discovery and pairing
  • Real-time data streaming from sensors
  • Connection state management
  • Error handling and reconnection logic

Real-time UI Updates

  • Live vitals display with color-coded health indicators
  • Connection status indicators
  • Fall detection alerts
  • Smooth animations and transitions

Voice Assistant

  • Natural language processing for health queries
  • Speech-to-text and text-to-speech integration
  • Context-aware responses
  • Accessibility features

Data Management

  • Local storage of vitals data
  • Configurable data retention
  • Export capabilities
  • Privacy-focused design

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support and questions, please contact the development team or create an issue in the repository.


Note: This app is designed for healthcare applications and should be used in accordance with relevant medical device regulations and guidelines.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages