App
Récupère les informations de l'appareil et de l'application, définit le presse-papiers, relance l'application et gère les paramètres au niveau de l'appareil. Les mutations de dossiers favoris sont documentées sous la section Fichiers.
Définitions de types
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 }Opérations
app
Récupère tout l'état de l'appareil et de l'application en une seule requête.
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
Récupère les informations matérielles et OS (fabricant, modèle, niveau de SDK, etc.).
query GetDeviceInfo {
deviceInfo { manufacturer model sdkInt buildChannel }
}battery
Récupère le niveau actuel de la batterie, l'état de charge, la santé et la tension.
query GetBattery {
battery { level status health plugged temperature voltage }
}setTempValue
Définit une paire clé/valeur temporaire dans la mémoire du serveur. Effacée au redémarrage du serveur HTTP.
mutation SetTempValue($key: String!, $value: String!) {
setTempValue(key: $key, value: $value) { key value }
}relaunchApp
Redémarre le processus PlainApp sur l'appareil.
mutation RelaunchApp {
relaunchApp
}openAccessibilitySettings
Ouvre l'écran des paramètres d'Accessibilité Android sur l'appareil. Requis avant que sendScreenMirrorControl puisse distribuer des gestes.
mutation OpenAccessibilitySettings {
openAccessibilitySettings
}openWebSettings
Ouvre l'écran des paramètres de l'interface web PlainApp sur l'appareil (mot de passe, 2FA, etc.).
mutation OpenWebSettings {
openWebSettings
}setClip
Définit le presse-papiers de l'appareil au texte indiqué.
mutation SetClip($text: String!) {
setClip(text: $text)
}updateDeviceName
Change le nom d'affichage de l'appareil montré dans l'interface web et diffusé aux peers appairés.
mutation UpdateDeviceName($name: String!) {
updateDeviceName(name: $name)
}