Documentation
¶
Overview ¶
Package device describes the phone the app is running on.
nimbus native plugin add device d, err := device.Get(ctx) b, err := device.GetBattery(ctx)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Battery ¶
type Battery struct {
Level float32 `json:"level"` // 0..1; below 0 when the phone can't say
Charging bool `json:"charging"` // whether it is plugged in
// LowPower is the phone's power saving mode: a good moment to do less.
LowPower bool `json:"lowPower"`
}
Battery is how much charge is left.
type Info ¶
type Info struct {
Platform string `json:"platform"` // "ios" or "android"
Model string `json:"model"` // e.g. "iPhone17,1", "Pixel 9"
Manufacturer string `json:"manufacturer"` // e.g. "Apple", "Google"
OSVersion string `json:"osVersion"` // the system version
Memory int64 `json:"memory"` // bytes
Virtual bool `json:"virtual"` // a simulator or emulator
}
Info is the phone.
Click to show internal directories.
Click to hide internal directories.