HomeMirror - Android Smart Mirror Application
Prerequisites
- Android device (preferably an older model like Nexus 7 2012)
- Android Studio for development
- Forecast.io API key (required for weather functionality)
- Two-way mirror (at least as large as your Android device)
- Mounting materials (reusable double-sided adhesive recommended)
Installation
-
Clone the repository:
git clone https://github.com/HannahMitt/HomeMirror.git cd HomeMirror -
Set up API key:
- Create a file
app/src/main/res/values/keys.xmlwith the following content:<?xml version="1.0" encoding="utf-8"?> <resources> <string name="dark_sky_api_key">YOUR_FORECAST_IO_API_KEY</string> </resources>
- Create a file
-
Open in Android Studio:
- Import the project into Android Studio
- Connect your Android device or set up an emulator
- Build and run the application
Configuration
API Configuration
- Forecast.io API Key: Required for weather data
- Sign up at https://developer.forecast.io/
- Add to
keys.xmlas shown above
Device Configuration
- Enable "Stay Awake" developer option: "Screen will never sleep while charging"
- This keeps the mirror display active when plugged in
Mirror Assembly
- Obtain a two-way mirror (6"x12" with 1/8" thickness recommended)
- Cut black construction paper backing to mirror size
- Cut hole in backing for device display
- Attach backing to mirror using spray adhesive
- Mount device to mirror using reusable double-sided adhesive
- Mount assembly to wall with long USB cable for power
Build & Run
Development
- Open project in Android Studio
- Connect Android device via USB
- Select device from run configuration dropdown
- Click "Run" (green play button) or press Shift+F10
- Enable "Stay Awake" option on device
Production
- Build APK for distribution:
./gradlew assembleRelease - Install APK on target device
- Configure device settings as mentioned above
Deployment
Recommended Platforms
- Local deployment: Direct installation on Android device
- Development: Android Studio with connected device or emulator
- Distribution: Google Play Store (if publishing)
Installation on Device
- Enable "Unknown Sources" in device settings
- Transfer APK to device
- Install and configure as described in Configuration section
Troubleshooting
Common Issues
1. Weather data not displaying
- Verify Forecast.io API key is correctly set in
keys.xml - Check internet connectivity on device
- Ensure API key has proper permissions
2. App crashes on startup
- Check Logcat in Android Studio for error messages
- Verify all required permissions are granted
- Ensure device meets minimum Android version requirements
3. Display not visible through mirror
- Verify mirror is two-way (not regular mirror)
- Check device brightness is set to maximum
- Ensure black backing is properly applied
4. Device goes to sleep
- Confirm "Stay Awake" developer option is enabled
- Check USB connection is providing power
- Verify device is charging while in use
API Issues
Forecast.io API limits
- Free tier has request limits
- Monitor usage in API dashboard
- Consider caching responses for frequently accessed data
Location services
- Ensure location permissions are granted
- Verify GPS is enabled on device
- Check that location services are functioning properly
Hardware Issues
Mounting problems
- Use sufficient adhesive for secure mounting
- Ensure mirror is clean before applying adhesive
- Test mounting strength before final installation
Display alignment
- Carefully align device with cutout in backing
- Check for light leaks around edges
- Adjust positioning for optimal visibility
Performance Issues
Battery drain
- Use device with good battery life
- Keep device plugged in during use
- Consider using a device with efficient power management
Slow loading
- Check internet connection speed
- Verify API response times
- Consider implementing local caching for frequently accessed data