A comprehensive baby monitoring application with live video feed, sleep tracking, and environmental monitoring. This project converts a web-based baby monitor into a native Android APK using Apache Cordova.
- Live Video Feed: Real-time baby monitoring with camera integration
- Sleep Tracking: Monitor sleep duration, wake-ups, and sleep patterns
- Screenshot & Recording: Capture photos and record videos of your baby
- Environmental Monitoring: Track heart rate, oxygen levels, air quality, and humidity
- Fullscreen Mode: Immersive viewing experience
- Offline Support: Works without internet connection for basic features
- Native Mobile Experience: Optimized for Android devices
This project uses Apache Cordova to convert the web application into a native Android APK with the following capabilities:
- Camera access for live monitoring
- File system access for saving photos/videos
- Device vibration for notifications
- Network status monitoring
- Screen orientation control
- Status bar customization
- Back button handling
- Camera access
- Microphone access
- File storage access
- Network access
- Wake lock (keep screen on)
-
Node.js (v14 or higher)
# Check if installed node --version npm --version -
Android SDK (for building APK)
- Install Android Studio or Android SDK Command Line Tools
- Set
ANDROID_HOMEenvironment variable - Add SDK tools to PATH
-
Java Development Kit (JDK)
- JDK 8 or higher required
-
Clone/Download the project
# If using git git clone <repository-url> cd baby-monitor-app
-
Run the build script
# Make script executable chmod +x build-apk.sh # Run the build ./build-apk.sh
-
Alternative manual build
# Install Cordova globally npm install -g cordova # Install dependencies npm install # Add Android platform cordova platform add android # Install plugins cordova plugin add cordova-plugin-whitelist cordova plugin add cordova-plugin-camera cordova plugin add cordova-plugin-media-capture cordova plugin add cordova-plugin-file cordova plugin add cordova-plugin-device # ... (see build-apk.sh for complete list) # Build APK cordova build android
-
Enable Unknown Sources
- Go to Settings > Security
- Enable "Unknown sources" or "Install unknown apps"
-
Install APK
# Using ADB (if device connected to computer) adb install baby-monitor.apk # Or transfer APK to device and tap to install
-
Grant Permissions
- Camera access
- Microphone access
- Storage access
baby-monitor-app/
├── index.html # Main HTML file
├── script.js # Main JavaScript functionality
├── style.css # Styling and responsive design
├── cordova-app.js # Cordova-specific functionality
├── config.xml # Cordova configuration
├── package.json # Node.js dependencies
├── manifest.json # PWA manifest
├── build-apk.sh # Build script
├── res/ # App resources (icons, splash screens)
│ ├── icon/
│ │ ├── android/ # Android icons
│ │ └── ios/ # iOS icons
│ └── screen/
│ ├── android/ # Android splash screens
│ └── ios/ # iOS splash screens
└── platforms/ # Generated platform code (after build)
- config.xml: Cordova configuration with permissions, plugins, and platform settings
- cordova-app.js: Native device integration (camera, file system, notifications)
- script.js: Main app logic with Cordova integration
- package.json: Dependencies and build scripts
-
App Information
- Edit
config.xmlto change app name, description, version - Update
package.jsonfor npm package info
- Edit
-
Permissions
- Modify
config.xmlto add/remove Android permissions - Update iOS permissions in the same file
- Modify
-
Icons and Splash Screens
- Replace files in
res/icon/andres/screen/ - Update references in
config.xml
- Replace files in
-
Firebase Configuration
- Update Firebase config in
index.html - Modify API keys and project settings
- Update Firebase config in
-
Cordova not found
npm install -g cordova # Or with sudo if nee 71C7 ded sudo npm install -g cordova -
Android SDK not found
# Set environment variables export ANDROID_HOME=/path/to/android-sdk export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
-
Java not found
# Install JDK sudo apt-get install openjdk-8-jdk # Ubuntu/Debian brew install openjdk@8 # macOS
-
Gradle build failed
# Clean and rebuild cordova clean android cordova build android
-
Camera not working
- Ensure camera permissions are granted
- Check if device has camera hardware
- Test on physical device (not emulator)
-
Video recording fails
- Check storage permissions
- Ensure sufficient storage space
- Test with shorter recording duration
-
Network features not working
- Check internet connectivity
- Verify Firebase configuration
- Test with mobile data and WiFi
Run this command to check if your system meets the requirements:
cordova requirements androidThis will check for:
- Java JDK
- Android SDK
- Android target SDK
- Gradle
- All network requests use HTTPS
- Camera access requires explicit user permission
- File access is sandboxed to app directory
- Firebase security rules should be configured properly
MIT License - see LICENSE file for details
- Fork the repository
- Create a feature branch
- Make your changes
- Test on Android device
- Submit a pull request
For issues and questions:
- Check the troubleshooting section
- Review Cordova documentation
- Check Android development requirements
- Test on multiple devices
Note: This app is designed for educational and personal use. For commercial baby monitoring applications, ensure compliance with relevant safety standards and regulations.