npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

expo-meta-wearables

v0.4.0

Published

Expo module for Meta AI Glasses (Ray-Ban Meta) - Device Access Toolkit integration

Downloads

41

Readme

expo-meta-wearables

Expo module for Meta AI Glasses (Ray-Ban Meta) - Device Access Toolkit integration.

This package provides a React Native/Expo interface to the Meta Wearables Device Access Toolkit, enabling developers to build hands-free wearable experiences with Meta's Ray-Ban smart glasses.

Features

  • 📷 Camera Access - Capture photos and videos from the glasses' 12MP ultra-wide camera
  • 🎤 Microphone Array - Access to 5-microphone array for audio input
  • 🔊 Open-ear Speakers - Audio output capabilities
  • 🔗 Device Management - Connect, disconnect, and monitor device status
  • 📱 Cross-platform - Support for both iOS (15.2+) and Android (10+)

Installation

yarn add expo-meta-wearables

Prerequisites

  1. Meta Developer Account - Sign up at developers.meta.com
  2. Meta App ID - Create an app and get your App ID
  3. SDK Access - Request access to the Meta Wearables Device Access Toolkit (currently in developer preview)

Configuration

Add the plugin to your app.json or app.config.js:

{
  "expo": {
    "plugins": [
      [
        "expo-meta-wearables",
        {
          "appId": "YOUR_META_APP_ID",
          "analyticsEnabled": false
        }
      ]
    ]
  }
}

iOS Setup

Current Status: The Meta Wearables SDK has Swift 6.0 compatibility issues with current Xcode versions (16.2+). The module currently uses stub implementations that return NOT_IMPLEMENTED errors.

All API functions are available and will work once Meta releases a Swift 6.0-compatible SDK version. No code changes will be required in your app.

Android Setup (GitHub Packages)

For Android, you'll need GitHub credentials to access the Meta Wearables SDK. Add to your local.properties:

github_username=YOUR_GITHUB_USERNAME
github_token=YOUR_GITHUB_PERSONAL_ACCESS_TOKEN

Your GitHub token needs the read:packages scope. Create one at https://github.com/settings/tokens

Usage

Initialize the SDK

import * as MetaWearables from 'expo-meta-wearables';

// Initialize before using any other methods
// Analytics is disabled by default
await MetaWearables.initialize({
  appId: 'YOUR_META_APP_ID',
  analyticsEnabled: false, // Optional, defaults to false
});

Connect to Glasses

// Check if device is connected
const isConnected = await MetaWearables.isDeviceConnected();

if (!isConnected) {
  // Prompt user to connect their glasses
  await MetaWearables.connectDevice();
}

// Get device information
const deviceInfo = await MetaWearables.getDeviceInfo();
console.log('Device:', deviceInfo);

Capture Photos

// Request camera permission
const hasPermission = await MetaWearables.requestCameraPermission();

if (hasPermission) {
  // Capture a photo
  const photo = await MetaWearables.capturePhoto({
    quality: 90,
  });

  console.log('Photo URI:', photo.uri);
  console.log('Dimensions:', photo.width, 'x', photo.height);
}

Record Videos

// Start recording
await MetaWearables.startVideoRecording({
  quality: 'high',
  maxDuration: 30, // seconds
});

// Check if recording
const isRecording = await MetaWearables.isRecording();

// Stop recording
const video = await MetaWearables.stopVideoRecording();
console.log('Video URI:', video.uri);
console.log('Duration:', video.duration, 'seconds');

Listen to Events

import { useEffect } from 'react';

// Monitor connection status
useEffect(() => {
  const subscription = MetaWearables.addConnectionListener((event) => {
    console.log('Connection status:', event.status);
    if (event.device) {
      console.log('Device info:', event.device);
    }
    if (event.error) {
      console.error('Connection error:', event.error);
    }
  });

  return () => subscription.remove();
}, []);

// Monitor recording status
useEffect(() => {
  const subscription = MetaWearables.addRecordingListener((event) => {
    console.log('Recording:', event.isRecording);
  });

  return () => subscription.remove();
}, []);

API Reference

Methods

initialize(config: MetaWearablesConfig): Promise<void>

Initialize the Meta Wearables SDK. Must be called before any other methods.

isDeviceConnected(): Promise<boolean>

Check if Meta AI Glasses are currently connected.

getDeviceInfo(): Promise<DeviceInfo | null>

Get information about the connected device.

connectDevice(): Promise<void>

Connect to Meta AI Glasses. Prompts user if not already connected.

disconnectDevice(): Promise<void>

Disconnect from Meta AI Glasses.

capturePhoto(options?: PhotoOptions): Promise<MediaResult>

Capture a photo using the glasses camera.

startVideoRecording(options?: VideoOptions): Promise<void>

Start video recording.

stopVideoRecording(): Promise<MediaResult>

Stop video recording and return the video file.

isRecording(): Promise<boolean>

Check if video is currently recording.

requestMicrophonePermission(): Promise<boolean>

Request microphone permissions.

requestCameraPermission(): Promise<boolean>

Request camera permissions.

Event Listeners

addConnectionListener(listener: (event: ConnectionEvent) => void): Subscription

Subscribe to device connection events.

addRecordingListener(listener: (event: { isRecording: boolean }) => void): Subscription

Subscribe to recording status changes.

Current Status

This package is in early development and matches the Meta Wearables Device Access Toolkit developer preview status. Some features are placeholders pending the full SDK release.

Implemented

  • ✅ TypeScript API and type definitions
  • ✅ Expo config plugin for native configuration
  • ✅ Basic module structure for Android and iOS
  • ✅ Event system for connection and recording status

In Progress

  • 🚧 Full Meta Wearables SDK integration
  • 🚧 Camera capture implementation
  • 🚧 Video recording implementation
  • 🚧 Microphone access implementation

Resources

License

MIT

Contributing

Contributions are welcome! Please open an issue or submit a pull request.