App
Get device and app info, set clipboard, relaunch the app, and manage device-level settings. Favorite-folder mutations are documented under the Files section.
Type Definitions
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 }Operations
app
Get all device and app state in a single query.
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
Get hardware and OS info (manufacturer, model, SDK level, etc.).
query GetDeviceInfo {
deviceInfo { manufacturer model sdkInt buildChannel }
}battery
Get current battery level, charging status, health, and voltage.
query GetBattery {
battery { level status health plugged temperature voltage }
}setTempValue
Set a temporary key/value pair in server memory. Cleared when the HTTP server restarts.
mutation SetTempValue($key: String!, $value: String!) {
setTempValue(key: $key, value: $value) { key value }
}relaunchApp
Restart the PlainApp process on the device.
mutation RelaunchApp {
relaunchApp
}openAccessibilitySettings
Open the Android Accessibility settings screen on the device. Required before sendScreenMirrorControl can dispatch gestures.
mutation OpenAccessibilitySettings {
openAccessibilitySettings
}openWebSettings
Open the PlainApp web-UI settings screen on the device (password, 2FA, etc.).
mutation OpenWebSettings {
openWebSettings
}setClip
Set the device clipboard to the given text.
mutation SetClip($text: String!) {
setClip(text: $text)
}updateDeviceName
Change the device display name shown in the web UI and broadcast to paired peers.
mutation UpdateDeviceName($name: String!) {
updateDeviceName(name: $name)
}