返回

13. OpenClaw 移动端接入:iOS 与 Android 节点

本文介绍如何在 iOS 和 Android 设备上使用 OpenClaw,包括移动端 App 安装、节点配对、Canvas 支持、摄像头和屏幕录制等功能,实现真正的移动 AI 助手体验。

适用于 OpenClaw v2026.2 | 本文假设你已完成 Gateway 部署,想在移动设备上使用。

TL;DR: iOS/Android App 作为"节点"连接 Gateway,提供摄像头、屏幕录制、位置、通知能力。配对流程:打开 App → 发现 Gateway → 输入配对码。命令:camera.snap(拍照)、screen.record(录屏)、location.get(位置)、notification.send(通知)。语音唤醒仅 iOS 支持说 “Hey Claw”。

移动端功能概览

功能对比

功能 iOS Android 说明
消息收发 通过 WebChat 或聊天应用
Canvas 可视化界面
摄像头 拍照并让 AI 分析
屏幕录制 录制并分享屏幕
位置服务 获取当前位置
通知 接收 AI 发送的通知
语音唤醒 “Hey Claw” 唤醒
本地执行 需要连接 Gateway

架构图

[iOS/Android App] <--WiFi/Cellular--> [Gateway] <---> [Agent]
        |                                    |
    [Node API]                        [Tools/Skills]
        |                                    |
   [设备能力]                         [外部服务]
    - 摄像头
    - 屏幕
    - 位置
    - 通知

iOS 安装

系统要求

要求 版本
iOS 15.0+
设备 iPhone 8 及以上

安装方式

方式一:TestFlight(推荐)

  1. 加入 TestFlight 测试
  2. 安装 OpenClaw iOS App
  3. 打开 App 进行配对

方式二:源码编译

# 克隆仓库
git clone https://github.com/openclaw/openclaw.git
cd openclaw/apps/ios

# 安装依赖
pod install

# 打开 Xcode
open OpenClaw.xcworkspace

# 编译并安装到设备

iOS 权限配置

权限 用途 必需
相机 拍照分析 可选
照片库 保存/读取照片 可选
位置 获取当前位置 可选
通知 接收消息通知 推荐
麦克风 语音唤醒 可选
Face ID 安全认证 可选

Android 安装

系统要求

要求 版本
Android 10.0+ (API 29+)
设备 大多数现代设备

安装方式

方式一:APK 直接安装

  1. 下载最新 APK
  2. 允许未知来源安装
  3. 安装并打开 App

方式二:源码编译

# 克隆仓库
git clone https://github.com/openclaw/openclaw.git
cd openclaw/apps/android

# 编译
./gradlew assembleDebug

# 安装到设备
adb install app/build/outputs/apk/debug/app-debug.apk

Android 权限配置

权限 用途 必需
相机 拍照分析 可选
存储 保存/读取文件 可选
位置 获取当前位置 可选
通知 接收消息通知 推荐
麦克风 语音输入 可选

节点配对

配对流程

sequenceDiagram
    participant A as 移动 App
    participant G as Gateway
    participant D as 发现服务
    
    A->>D: 广播发现请求
    D-->>A: 发现 Gateway
    A->>G: 请求配对
    G-->>A: 返回配对码
    A->>A: 显示配对码
    Note over A,G: 用户在 App 输入配对码
    A->>G: 提交配对码
    G->>G: 验证配对码
    G-->>A: 配对成功
    A->>G: 注册节点能力
    G-->>A: 确认注册

配对步骤

1. 确保 Gateway 运行

# 启动 Gateway
openclaw gateway --port 18789

# 检查状态
openclaw health

2. 打开移动 App

打开 OpenClaw iOS/Android App。

3. 发现 Gateway

App 会自动扫描本地网络的 Gateway,或手动输入 Gateway 地址:

http://192.168.1.100:18789

4. 获取配对码

在 Gateway 终端查看配对码:

openclaw pairing list

# 输出示例:
# Node     Code     Platform
# ios-1    ABC123   iOS
# android-1 XYZ789  Android

5. 输入配对码

在 App 中输入配对码,完成配对。

配置节点

{
  "nodes": {
    "ios-1": {
      "platform": "ios",
      "capabilities": ["camera", "screen_record", "location", "notification"],
      "autoConnect": true
    },
    "android-1": {
      "platform": "android",
      "capabilities": ["camera", "screen_record", "location", "notification", "sms"],
      "autoConnect": true
    }
  }
}

摄像头功能

拍照让 AI 分析

用户:帮我看看冰箱里有什么

Agent:好的,让我通过你的手机摄像头看看...
[调用 camera.snap]
[分析图像]
你的冰箱里有:
- 牛奶(半瓶)
- 鸡蛋(6个)
- 黄瓜(2根)
- 番茄(几个)
建议可以做番茄炒蛋~

摄像头命令

命令 说明
camera.snap 拍照
camera.video 录制视频
camera.switch 切换前后摄像头

配置摄像头

{
  "nodes": {
    "ios-1": {
      "camera": {
        "defaultCamera": "back",
        "quality": "high",
        "saveToGallery": false
      }
    }
  }
}

屏幕录制

录制并分享

用户:帮我看看这个 App 怎么用

Agent:好的,请开始录制屏幕...

[用户操作 App]

Agent:我看到了,这是一个待办事项 App。
你可以:
1. 点击右下角的 + 号添加任务
2. 向左滑动删除任务
3. 点击任务可以编辑详情

屏幕录制配置

{
  "nodes": {
    "ios-1": {
      "screenRecord": {
        "maxDuration": 300,
        "quality": "medium",
        "withAudio": true
      }
    }
  }
}

位置服务

获取当前位置

用户:附近有什么好吃的?

Agent:让我看看你在哪里...
[调用 location.get]
你目前在北京市朝阳区三里屯附近。
推荐几家评分高的餐厅:
1. 小吊梨汤 - 4.8分,传统京菜
2. 胡大饭馆 - 4.7分,小龙虾
3. ...

位置命令

命令 说明
location.get 获取当前位置
location.watch 持续监听位置变化

位置配置

{
  "nodes": {
    "ios-1": {
      "location": {
        "accuracy": "high",
        "distanceFilter": 100
      }
    }
  }
}

通知功能

发送通知

Agent:任务已完成,我发送一个通知到你的手机。

[调用 notification.send]

手机收到通知:
标题:任务完成
内容:代码已部署到生产环境

通知配置

{
  "nodes": {
    "ios-1": {
      "notification": {
        "enabled": true,
        "sound": true,
        "badge": true
      }
    }
  }
}

语音唤醒(iOS)

配置语音唤醒

{
  "nodes": {
    "ios-1": {
      "voiceWake": {
        "enabled": true,
        "keyword": "hey claw",
        "sensitivity": "medium"
      }
    }
  }
}

使用语音唤醒

  1. 说 “Hey Claw”
  2. App 自动启动监听
  3. 说出你的问题
  4. Agent 响应

Canvas 移动端

Canvas 在移动端

移动端 Canvas 提供与桌面端相同的可视化体验:

  • 交互式仪表盘
  • 实时数据展示
  • 表单输入
  • 图表和表格

移动端 Canvas 优化

{
  "canvas": {
    "mobile": {
      "adaptiveLayout": true,
      "touchGestures": true,
      "performanceMode": "balanced"
    }
  }
}

节点管理

查看节点

# 列出所有节点
openclaw nodes list

# 输出示例:
# Node        Platform  Status   Capabilities
# ios-1       iOS       online   camera,location,notification
# android-1   Android   offline  camera,location,sms

# 查看节点详情
openclaw nodes show ios-1

节点操作

# 启用节点
openclaw nodes enable ios-1

# 禁用节点
openclaw nodes disable ios-1

# 断开节点
openclaw nodes disconnect ios-1

# 重命名节点
openclaw nodes rename ios-1 --name "我的 iPhone"

故障排查

节点无法连接

# 检查 Gateway 状态
openclaw health

# 检查网络
ping 192.168.1.100

# 查看节点日志
openclaw logs --node ios-1

权限问题

# 检查节点权限
openclaw nodes permissions ios-1

# 输出示例:
# Permission      Status
# Camera          Granted
# Location        Granted
# Notification    Granted
# Microphone      Denied

配对失败

  1. 确保 Gateway 正在运行
  2. 检查网络连接(同一局域网)
  3. 检查防火墙设置
  4. 尝试重新配对

小结

移动端节点扩展了 OpenClaw 的能力:

  • 摄像头:拍照分析、视频录制
  • 位置:获取当前位置
  • 通知:推送消息到手机
  • Canvas:移动端可视化界面
  • 语音唤醒:Hands-free 操作

更新记录

  • 2026-02-26:初版发布

系列导航