device

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WebAvailable = func() bool { return false }

Functions

func ADB

func ADB() string

func AppInstalled

func AppInstalled(ctx context.Context, d Info, appID string) bool

func IsURL

func IsURL(s string) bool

Types

type ADBDevice

type ADBDevice struct {
	Serial string
	// contains filtered or unexported fields
}

func NewADB

func NewADB(serial string) *ADBDevice

func (*ADBDevice) ExistingForward

func (a *ADBDevice) ExistingForward(ctx context.Context, remote string) int

func (*ADBDevice) Forward

func (a *ADBDevice) Forward(ctx context.Context, remote string) (int, error)

func (*ADBDevice) Run

func (a *ADBDevice) Run(ctx context.Context, args ...string) (string, error)

func (*ADBDevice) Shell

func (a *ADBDevice) Shell(ctx context.Context, script string) (string, error)

type Info

type Info struct {
	Platform Platform `json:"platform"`
	Serial   string   `json:"serial"`
	Name     string   `json:"name"`
	Model    string   `json:"model,omitempty"`
	Emulator bool     `json:"emulator"`
	State    string   `json:"state"`
	Headless bool     `json:"-"`
}

func List

func List(ctx context.Context) []Info

func Pick

func Pick(devs []Info, platform Platform, want string) (Info, error)

func PickOne added in v0.6.4

func PickOne(devs []Info, platform Platform, want string) (Info, error)

func WebDevice

func WebDevice(n int) Info

func (Info) String

func (i Info) String() string

type Platform

type Platform string
const (
	Android Platform = "android"
	IOS     Platform = "ios"
	Web     Platform = "web"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL