← Back to HannahMitt/HomeMirror

How to Deploy & Use HannahMitt/HomeMirror

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

  1. Clone the repository:

    git clone https://github.com/HannahMitt/HomeMirror.git
    cd HomeMirror
    
  2. Set up API key:

    • Create a file app/src/main/res/values/keys.xml with the following content:
      <?xml version="1.0" encoding="utf-8"?>
      <resources>
          <string name="dark_sky_api_key">YOUR_FORECAST_IO_API_KEY</string>
      </resources>
      
  3. 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

Device Configuration

  • Enable "Stay Awake" developer option: "Screen will never sleep while charging"
  • This keeps the mirror display active when plugged in

Mirror Assembly

  1. Obtain a two-way mirror (6"x12" with 1/8" thickness recommended)
  2. Cut black construction paper backing to mirror size
  3. Cut hole in backing for device display
  4. Attach backing to mirror using spray adhesive
  5. Mount device to mirror using reusable double-sided adhesive
  6. Mount assembly to wall with long USB cable for power

Build & Run

Development

  1. Open project in Android Studio
  2. Connect Android device via USB
  3. Select device from run configuration dropdown
  4. Click "Run" (green play button) or press Shift+F10
  5. Enable "Stay Awake" option on device

Production

  1. Build APK for distribution:
    ./gradlew assembleRelease
    
  2. Install APK on target device
  3. 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

  1. Enable "Unknown Sources" in device settings
  2. Transfer APK to device
  3. 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