Skip to content

Encache Camera Testing Guide

This guide describes how to test the Meta Ray-Ban camera integration with the Encache app.

Prerequisites

  • Meta Ray-Ban Glasses: Paired with the phone via the Meta View app.
  • Mobile Device: iOS or Android phone with developer mode enabled.
  • Development Environment: Node.js installed, dependencies installed (npm install in main/app).

1. Setup & Installation

  1. Install Dependencies:

    cd main/app
    npm install
    

  2. Start the Upload Queue (Local Dev): If testing offline queuing only (without real backend), ensure the queue is initialized:

    # (No extra command needed, runs inside the app)
    

  3. Run the App:

    npx expo run:ios --device    # For iOS (requires Xcode)
    # OR
    npx expo run:android --device # For Android (requires Android Studio/ADB)
    

2. Testing the Camera Flow

Scenario A: User-Triggered Capture

  1. Wear the glasses.
  2. Open the Encache App. Ensure it is foregrounded.
  3. Trigger Capture: Say "Hey Meta, remember this" OR press the capture button on the glasses.
  4. Verify App Reaction:
    • The app should receive the stream/file transfer notification from the Meta SDK.
    • Check the "Upload Queue" tab (if available) or Console logs for "Received capture from glasses".

Scenario B: Manual Capture (In-App)

  1. Navigate to the "Capture" tab.
  2. Tap "Start Recording".
  3. Record for >3 seconds.
  4. Tap "Stop Recording".
  5. Verify:
    • App should generate an event manifest.
    • File should appear in the Upload Queue.

3. Verification

On Device

  • Console Logs: Look for [MetaSDK] Received new capture: <file_path> and [EventBuilder] Created event: <event_id>.
  • UI: The event should appear in the "Pending Uploads" list.

Backend Verification (If API is live)

  • S3: Check the raw data bucket for the new objects.
  • Database: Query the events table:
    SELECT * FROM events ORDER BY device_time_unix_ms DESC LIMIT 1;
    

Troubleshooting

  • Glasses not connecting: Ensure Meta View app is open in background.
  • No stream data: Check permissions (Bluetooth, Local Network) for the Encache app.
  • Upload failures: Check internet connection and AWS credentials in .env.