fingerprint

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Overview

Package fingerprint provides Go bindings for android.hardware.fingerprint.

Index

Constants

View Source
const (
	FingerprintAcquiredGood          = consts.FingerprintAcquiredGood
	FingerprintAcquiredImagerDirty   = consts.FingerprintAcquiredImagerDirty
	FingerprintAcquiredInsufficient  = consts.FingerprintAcquiredInsufficient
	FingerprintAcquiredPartial       = consts.FingerprintAcquiredPartial
	FingerprintAcquiredTooFast       = consts.FingerprintAcquiredTooFast
	FingerprintAcquiredTooSlow       = consts.FingerprintAcquiredTooSlow
	FingerprintErrorCanceled         = consts.FingerprintErrorCanceled
	FingerprintErrorHwNotPresent     = consts.FingerprintErrorHwNotPresent
	FingerprintErrorHwUnavailable    = consts.FingerprintErrorHwUnavailable
	FingerprintErrorLockout          = consts.FingerprintErrorLockout
	FingerprintErrorLockoutPermanent = consts.FingerprintErrorLockoutPermanent
	FingerprintErrorNoFingerprints   = consts.FingerprintErrorNoFingerprints
	FingerprintErrorNoSpace          = consts.FingerprintErrorNoSpace
	FingerprintErrorTimeout          = consts.FingerprintErrorTimeout
	FingerprintErrorUnableToProcess  = consts.FingerprintErrorUnableToProcess
	FingerprintErrorUserCanceled     = consts.FingerprintErrorUserCanceled
	FingerprintErrorVendor           = consts.FingerprintErrorVendor
)

Variables

This section is empty.

Functions

func Init

func Init(env *jni.Env) error

Init resolves all JNI class and method references for this package. It is safe to call multiple times (uses sync.Once internally). Exported for E2E testing on Android.

Types

type Manager

type Manager struct {
	VM  *jni.VM
	Ctx *app.Context
	Obj *jni.GlobalRef
}

Manager wraps android.hardware.fingerprint.FingerprintManager.

func NewManager

func NewManager(ctx *app.Context) (*Manager, error)

NewManager obtains android.hardware.fingerprint.FingerprintManager from the Android system service manager.

func (*Manager) Close

func (m *Manager) Close()

Close releases the global reference to the underlying Java object. After Close, the Manager must not be used.

func (*Manager) HasEnrolledFingerprints

func (m *Manager) HasEnrolledFingerprints() (bool, error)

HasEnrolledFingerprints calls android.hardware.fingerprint.FingerprintManager.hasEnrolledFingerprints.

func (*Manager) IsHardwareDetected

func (m *Manager) IsHardwareDetected() (bool, error)

IsHardwareDetected calls android.hardware.fingerprint.FingerprintManager.isHardwareDetected.

type ManagerAuthenticationCallback

type ManagerAuthenticationCallback struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

ManagerAuthenticationCallback wraps android.hardware.fingerprint.FingerprintManager$AuthenticationCallback.

func (*ManagerAuthenticationCallback) OnAuthenticationError

func (m *ManagerAuthenticationCallback) OnAuthenticationError(arg0 int32, arg1 string) error

OnAuthenticationError calls android.hardware.fingerprint.FingerprintManager$AuthenticationCallback.onAuthenticationError.

func (*ManagerAuthenticationCallback) OnAuthenticationFailed

func (m *ManagerAuthenticationCallback) OnAuthenticationFailed() error

OnAuthenticationFailed calls android.hardware.fingerprint.FingerprintManager$AuthenticationCallback.onAuthenticationFailed.

func (*ManagerAuthenticationCallback) OnAuthenticationHelp

func (m *ManagerAuthenticationCallback) OnAuthenticationHelp(arg0 int32, arg1 string) error

OnAuthenticationHelp calls android.hardware.fingerprint.FingerprintManager$AuthenticationCallback.onAuthenticationHelp.

func (*ManagerAuthenticationCallback) OnAuthenticationSucceeded

func (m *ManagerAuthenticationCallback) OnAuthenticationSucceeded(arg0 *jni.Object) error

OnAuthenticationSucceeded calls android.hardware.fingerprint.FingerprintManager$AuthenticationCallback.onAuthenticationSucceeded.

type ManagerAuthenticationResult

type ManagerAuthenticationResult struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

ManagerAuthenticationResult wraps android.hardware.fingerprint.FingerprintManager$AuthenticationResult.

func (*ManagerAuthenticationResult) GetCryptoObject

func (m *ManagerAuthenticationResult) GetCryptoObject() (*jni.Object, error)

GetCryptoObject calls android.hardware.fingerprint.FingerprintManager$AuthenticationResult.getCryptoObject.

type ManagerCryptoObject

type ManagerCryptoObject struct {
	VM  *jni.VM
	Obj *jni.GlobalRef
}

ManagerCryptoObject wraps android.hardware.fingerprint.FingerprintManager$CryptoObject.

func (*ManagerCryptoObject) GetCipher

func (m *ManagerCryptoObject) GetCipher() (*jni.Object, error)

GetCipher calls android.hardware.fingerprint.FingerprintManager$CryptoObject.getCipher.

func (*ManagerCryptoObject) GetMac

func (m *ManagerCryptoObject) GetMac() (*jni.Object, error)

GetMac calls android.hardware.fingerprint.FingerprintManager$CryptoObject.getMac.

func (*ManagerCryptoObject) GetSignature

func (m *ManagerCryptoObject) GetSignature() (*jni.Object, error)

GetSignature calls android.hardware.fingerprint.FingerprintManager$CryptoObject.getSignature.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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