App
Lấy thông tin thiết bị và ứng dụng, đặt clipboard, khởi chạy lại ứng dụng và quản lý cài đặt cấp thiết bị. Các mutation thư mục yêu thích được tài liệu hóa trong phần Files.
Định nghĩa kiểu
type App {
usbConnected: Boolean!
urlToken: String! # current session token
httpPort: Int!
httpsPort: Int!
appDir: String!
deviceName: String!
battery: Int! # battery level 0–100
appVersion: Int! # versionCode
osVersion: Int! # Android SDK level e.g. 35
channel: String! # "github" | "google"
permissions: [String!]! # granted API permissions
audios: [PlaylistAudio!]! # current playlist
audioMode: MediaPlayMode! # REPEAT | REPEAT_ONE | SHUFFLE
audioCurrent: String! # path of the playing track
sdcardPath: String!
usbDiskPaths: [String!]!
internalStoragePath: String!
downloadsDir: String!
developerMode: Boolean!
favoriteFolders: [FavoriteFolder!]!
}
type FavoriteFolder {
rootPath: String!
fullPath: String!
alias: String # optional display alias, nullable
}
type TempValue {
key: String!
value: String!
}
type DeviceInfo {
# Hardware + OS info: manufacturer, model, sdkInt, buildChannel, etc.
# Fields are platform-dependent; see PlainApp source for the full list.
}
type Battery {
level: Int! # 0–100
status: BatteryStatus! # CHARGING | DISCHARGING | FULL | NOT_CHARGING
health: BatteryHealth!
plugged: BatteryPlugged!
temperature: Int! # tenths of a degree Celsius
voltage: Int! # millivolts
}
enum BatteryStatus { CHARGING DISCHARGING FULL NOT_CHARGING UNKNOWN }
enum BatteryHealth { GOOD OVERHEAT DEAD OVER_VOLTAGE UNSPECIFIED_FAILURE UNKNOWN COLD }
enum BatteryPlugged { AC USB WIRELESS NONE }Thao tác
app
Lấy tất cả trạng thái thiết bị và ứng dụng trong một query duy nhất.
query GetApp {
app {
usbConnected urlToken httpPort httpsPort appDir deviceName
battery appVersion osVersion channel permissions
audios { title path duration } audioMode audioCurrent
sdcardPath usbDiskPaths internalStoragePath downloadsDir developerMode
favoriteFolders { rootPath fullPath alias }
}
}deviceInfo
Lấy thông tin phần cứng và hệ điều hành (nhà sản xuất, mẫu, cấp SDK, v.v.).
query GetDeviceInfo {
deviceInfo { manufacturer model sdkInt buildChannel }
}battery
Lấy mức pin hiện tại, trạng thái sạc, sức khỏe và điện áp.
query GetBattery {
battery { level status health plugged temperature voltage }
}setTempValue
Đặt một cặp key/value tạm thời trong bộ nhớ máy chủ. Được xóa khi máy chủ HTTP khởi động lại.
mutation SetTempValue($key: String!, $value: String!) {
setTempValue(key: $key, value: $value) { key value }
}relaunchApp
Khởi động lại quy trình PlainApp trên thiết bị.
mutation RelaunchApp {
relaunchApp
}openAccessibilitySettings
Mở màn hình cài đặt Android Accessibility trên thiết bị. Yêu cầu trước khi sendScreenMirrorControl có thể điều phối cử chỉ.
mutation OpenAccessibilitySettings {
openAccessibilitySettings
}openWebSettings
Mở màn hình cài đặt web-UI PlainApp trên thiết bị (mật khẩu, 2FA, v.v.).
mutation OpenWebSettings {
openWebSettings
}setClip
Đặt clipboard thiết bị thành văn bản đã cho.
mutation SetClip($text: String!) {
setClip(text: $text)
}updateDeviceName
Thay đổi tên hiển thị thiết bị được hiển thị trong web UI và phát sóng đến các peer đã ghép nối.
mutation UpdateDeviceName($name: String!) {
updateDeviceName(name: $name)
}