Skip to main content

Biometric

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Biometrics on an emulator or simulator: read whether a face or finger is enrolled, enroll or unenroll one, and present a matching (match) or non-matching (nomatch) one to a prompt that is up. These call app_biometric.

Biometric​

func (d *Device) Biometric(ctx context.Context, action string) (BiometricStatus, error)

Biometric reads or sets the enrollment of an emulator's fingerprint or a simulator's face or finger — action "status", "enroll" or "unenroll" — or presents a matching ("match") or a stranger's ("nomatch") one to the prompt that is up. With no prompt up it returns an error rather than sending to nothing. A real phone returns an error.

Examples​

Enroll a face or a finger​

if _, err := dev.Biometric(ctx, "enroll"); err != nil {
return err
}

Present a matching one to the prompt that is up​

said, err := dev.Biometric(ctx, "match")
if err != nil {
return err
}
fmt.Println(said.Outcome)