目录

Meta Wearables Device Access Toolkit for Android

Maven Docs

The Meta Wearables Device Access Toolkit enables developers to utilize Meta’s AI glasses to build hands-free wearable experiences into their mobile applications. By integrating this SDK, developers can reliably connect to Meta’s AI glasses and leverage capabilities like video streaming and photo capture.

The Wearables Device Access Toolkit is in developer preview. Developers can access our SDK and documentation, test on supported AI glasses, and create organizations and release channels to share with test users.

Documentation & Community

Find our full developer documentation on the Wearables Developer Center.

You can find an overview of the Wearables Developer Center here. Create an account to stay informed of all updates, report bugs and register your organization. Set up a project and release channel to share your integration with test users.

For help, discussion about best practices or to suggest feature ideas visit our discussions forum.

See the changelog for the latest updates.

Including the SDK in your project

You can add the Wearables Device Access Toolkit to your Gradle project by following the steps below. You will need to provide a personal access token (classic) with at least read:packages scope as an environment variable named GITHUB_TOKEN or by adding it as a property named github_token in your local.properties file. See SDK for Android setup for more details.

1. Add the repository definition to settings.gradle.kts

val localProperties =
    Properties().apply {
        val localPropertiesPath = rootDir.toPath() / "local.properties"
        if (localPropertiesPath.exists()) {
            load(localPropertiesPath.inputStream())
        }
    }

dependencyResolutionManagement {
    ...
    repositories {
        ...
        maven {
            url = uri("https://maven.pkg.github.com/facebook/meta-wearables-dat-android")
            credentials {
                username = "" // not needed
                password = System.getenv("GITHUB_TOKEN") ?: localProperties.getProperty("github_token")
            }
        }
    }
}

2. Declare the Wearables Device Access Toolkit artifacts in libs.versions.toml

Check the available versions in GitHub Packages.

[versions]
mwdat = "0.6.0"

[libraries]
mwdat-core = { group = "com.meta.wearable", name = "mwdat-core", version.ref = "mwdat" }
mwdat-camera = { group = "com.meta.wearable", name = "mwdat-camera", version.ref = "mwdat" }
mwdat-mockdevice = { group = "com.meta.wearable", name = "mwdat-mockdevice", version.ref = "mwdat" }

3. Add the required components as dependencies in your app’s build.gradle.kts

dependencies {
    implementation(libs.mwdat.core)
    implementation(libs.mwdat.camera)
    implementation(libs.mwdat.mockdevice)
}

Developer Terms

  • By using the Wearables Device Access Toolkit, you agree to our Meta Wearables Developer Terms, including our Acceptable Use Policy.
  • By enabling Meta integrations, including through this SDK, Meta may collect information about how users’ Meta devices communicate with your app. Meta will use this information collected in accordance with our Privacy Policy.
  • You may limit Meta’s access to data from users’ devices by following the instructions below.

Opting out of data collection

To configure analytics settings in your Meta Wearables DAT Android app, add the following <meta-data> element to your app’s AndroidManifest.xml file within the <application> element:

<meta-data
    android:name="com.meta.wearable.mwdat.ANALYTICS_OPT_OUT"
    android:value="true"
    />

Default behavior: If the ANALYTICS_OPT_OUT metadata is missing or set to false, analytics are enabled (i.e., you are not opting out). Set to true to disable data collection.

Note: In other words, this setting controls whether or not you’re opting out of analytics:

  • true = Opt out (analytics disabled)
  • false = Opt in (analytics enabled)

Complete example:

<application
    android:name=".MyApplication"
    android:label="MyApp"
    android:icon="@mipmap/app_launcher">

    <!-- Required: Your application ID from Wearables Developer Center -->
    <meta-data
        android:name="com.meta.wearable.mwdat.APPLICATION_ID"
        android:value="your_app_id_here"
        />

    <!-- Optional: Disable analytics -->
    <meta-data
        android:name="com.meta.wearable.mwdat.ANALYTICS_OPT_OUT"
        android:value="true"
        />

    <!-- Your activities and other components -->
</application>

AI-Assisted Development

This repository includes config for three AI coding assistants, all generated from the same canonical SDK knowledge:

Tool Config How it loads
Claude Code .claude/skills/*.md Auto-discovered when you open the project
GitHub Copilot .github/copilot-instructions.md Auto-loaded by Copilot in VS Code
Cursor .cursor/rules/*.mdc Auto-loaded with glob-based triggers

Quick setup

Install config for your preferred tool:

# Install a specific tool's config
./install-skills.sh claude    # Claude Code only
./install-skills.sh copilot   # GitHub Copilot only
./install-skills.sh cursor    # Cursor only
./install-skills.sh all       # All tools

Or install everything remotely with a single command:

curl -sL https://raw.githubusercontent.com/facebook/meta-wearables-dat-android/main/install-skills.sh | bash

If you cloned this repository, the config is already included — no setup needed.

What’s included

  • Getting started — SDK setup, Gradle integration, manifest configuration
  • Camera streaming — StreamSession, video frames, resolution/frame rate, photo capture
  • MockDevice testing — Test without physical glasses using MockDeviceKit
  • Session lifecycle — Device session states, pause/resume, availability
  • Permissions & registration — App registration, camera permission flows
  • Debugging — Common issues, Developer Mode, version compatibility
  • Sample app guide — Building a complete DAT app

For API reference, point your AI tool at the llms.txt endpoint.

License

See the LICENSE file.

关于
57.4 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号