biometric

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Overview

Package biometric provides Go bindings for android.hardware.biometrics.

Index

Constants

View Source
const (
	AuthenticationResultTypeBiometric        = consts.AuthenticationResultTypeBiometric
	AuthenticationResultTypeDeviceCredential = consts.AuthenticationResultTypeDeviceCredential
	BiometricAcquiredGood                    = consts.BiometricAcquiredGood
	BiometricAcquiredImagerDirty             = consts.BiometricAcquiredImagerDirty
	BiometricAcquiredInsufficient            = consts.BiometricAcquiredInsufficient
	BiometricAcquiredPartial                 = consts.BiometricAcquiredPartial
	BiometricAcquiredTooFast                 = consts.BiometricAcquiredTooFast
	BiometricAcquiredTooSlow                 = consts.BiometricAcquiredTooSlow
	BiometricErrorCanceled                   = consts.BiometricErrorCanceled
	BiometricErrorHwNotPresent               = consts.BiometricErrorHwNotPresent
	BiometricErrorHwUnavailable              = consts.BiometricErrorHwUnavailable
	BiometricErrorIdentityCheckNotActive     = consts.BiometricErrorIdentityCheckNotActive
	BiometricErrorLockout                    = consts.BiometricErrorLockout
	BiometricErrorLockoutPermanent           = consts.BiometricErrorLockoutPermanent
	BiometricErrorNotEnabledForApps          = consts.BiometricErrorNotEnabledForApps
	BiometricErrorNoBiometrics               = consts.BiometricErrorNoBiometrics
	BiometricErrorNoDeviceCredential         = consts.BiometricErrorNoDeviceCredential
	BiometricErrorNoSpace                    = consts.BiometricErrorNoSpace
	BiometricErrorSecurityUpdateRequired     = consts.BiometricErrorSecurityUpdateRequired
	BiometricErrorTimeout                    = consts.BiometricErrorTimeout
	BiometricErrorUnableToProcess            = consts.BiometricErrorUnableToProcess
	BiometricErrorUserCanceled               = consts.BiometricErrorUserCanceled
	BiometricErrorVendor                     = consts.BiometricErrorVendor
	BiometricErrorNoneEnrolled               = consts.BiometricErrorNoneEnrolled
	BiometricErrorNoHardware                 = consts.BiometricErrorNoHardware
	BiometricSuccess                         = consts.BiometricSuccess
)
View Source
const (
	BiometricNoAuthentication = consts.BiometricNoAuthentication
)

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 added in v0.0.4

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

Manager wraps android.hardware.biometrics.BiometricManager.

func NewManager added in v0.0.4

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

NewManager obtains android.hardware.biometrics.BiometricManager from the Android system service manager.

func (*Manager) CanAuthenticate0 added in v0.0.4

func (m *Manager) CanAuthenticate0() (int32, error)

CanAuthenticate0 calls android.hardware.biometrics.BiometricManager.canAuthenticate.

func (*Manager) CanAuthenticate1_1 added in v0.0.4

func (m *Manager) CanAuthenticate1_1(arg0 int32) (int32, error)

CanAuthenticate1_1 calls android.hardware.biometrics.BiometricManager.canAuthenticate.

func (*Manager) Close added in v0.0.4

func (m *Manager) Close()

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

func (*Manager) GetLastAuthenticationTime added in v0.0.4

func (m *Manager) GetLastAuthenticationTime(arg0 int32) (int64, error)

GetLastAuthenticationTime calls android.hardware.biometrics.BiometricManager.getLastAuthenticationTime.

func (*Manager) GetStrings added in v0.0.4

func (m *Manager) GetStrings(arg0 int32) (*jni.Object, error)

GetStrings calls android.hardware.biometrics.BiometricManager.getStrings.

type Prompt added in v0.0.4

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

Prompt wraps android.hardware.biometrics.BiometricPrompt.

func (*Prompt) Authenticate3_1 added in v0.0.4

func (m *Prompt) Authenticate3_1(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 *jni.Object,
) error

Authenticate3_1 calls android.hardware.biometrics.BiometricPrompt.authenticate.

func (*Prompt) Authenticate4 added in v0.0.4

func (m *Prompt) Authenticate4(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 *jni.Object,
	arg3 *jni.Object,
) error

Authenticate4 calls android.hardware.biometrics.BiometricPrompt.authenticate.

func (*Prompt) GetAllowedAuthenticators added in v0.0.4

func (m *Prompt) GetAllowedAuthenticators() (int32, error)

GetAllowedAuthenticators calls android.hardware.biometrics.BiometricPrompt.getAllowedAuthenticators.

func (*Prompt) GetContentView added in v0.0.4

func (m *Prompt) GetContentView() (*jni.Object, error)

GetContentView calls android.hardware.biometrics.BiometricPrompt.getContentView.

func (*Prompt) GetDescription added in v0.0.4

func (m *Prompt) GetDescription() (string, error)

GetDescription calls android.hardware.biometrics.BiometricPrompt.getDescription.

func (*Prompt) GetLogoBitmap added in v0.0.4

func (m *Prompt) GetLogoBitmap() (*jni.Object, error)

GetLogoBitmap calls android.hardware.biometrics.BiometricPrompt.getLogoBitmap.

func (*Prompt) GetLogoDescription added in v0.0.4

func (m *Prompt) GetLogoDescription() (string, error)

GetLogoDescription calls android.hardware.biometrics.BiometricPrompt.getLogoDescription.

func (*Prompt) GetLogoRes added in v0.0.4

func (m *Prompt) GetLogoRes() (int32, error)

GetLogoRes calls android.hardware.biometrics.BiometricPrompt.getLogoRes.

func (*Prompt) GetNegativeButtonText added in v0.0.4

func (m *Prompt) GetNegativeButtonText() (string, error)

GetNegativeButtonText calls android.hardware.biometrics.BiometricPrompt.getNegativeButtonText.

func (*Prompt) GetSubtitle added in v0.0.4

func (m *Prompt) GetSubtitle() (string, error)

GetSubtitle calls android.hardware.biometrics.BiometricPrompt.getSubtitle.

func (*Prompt) GetTitle added in v0.0.4

func (m *Prompt) GetTitle() (string, error)

GetTitle calls android.hardware.biometrics.BiometricPrompt.getTitle.

func (*Prompt) IsConfirmationRequired added in v0.0.4

func (m *Prompt) IsConfirmationRequired() (bool, error)

IsConfirmationRequired calls android.hardware.biometrics.BiometricPrompt.isConfirmationRequired.

type PromptBuilder added in v0.0.4

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

PromptBuilder wraps android.hardware.biometrics.BiometricPrompt$Builder.

func (*PromptBuilder) Build added in v0.0.4

func (m *PromptBuilder) Build() (*jni.Object, error)

Build calls android.hardware.biometrics.BiometricPrompt$Builder.build.

func (*PromptBuilder) SetAllowedAuthenticators added in v0.0.4

func (m *PromptBuilder) SetAllowedAuthenticators(arg0 int32) (*jni.Object, error)

SetAllowedAuthenticators calls android.hardware.biometrics.BiometricPrompt$Builder.setAllowedAuthenticators.

func (*PromptBuilder) SetConfirmationRequired added in v0.0.4

func (m *PromptBuilder) SetConfirmationRequired(arg0 bool) (*jni.Object, error)

SetConfirmationRequired calls android.hardware.biometrics.BiometricPrompt$Builder.setConfirmationRequired.

func (*PromptBuilder) SetContentView added in v0.0.4

func (m *PromptBuilder) SetContentView(arg0 *jni.Object) (*jni.Object, error)

SetContentView calls android.hardware.biometrics.BiometricPrompt$Builder.setContentView.

func (*PromptBuilder) SetDescription added in v0.0.4

func (m *PromptBuilder) SetDescription(arg0 string) (*jni.Object, error)

SetDescription calls android.hardware.biometrics.BiometricPrompt$Builder.setDescription.

func (*PromptBuilder) SetDeviceCredentialAllowed added in v0.0.4

func (m *PromptBuilder) SetDeviceCredentialAllowed(arg0 bool) (*jni.Object, error)

SetDeviceCredentialAllowed calls android.hardware.biometrics.BiometricPrompt$Builder.setDeviceCredentialAllowed.

func (*PromptBuilder) SetLogoBitmap added in v0.0.4

func (m *PromptBuilder) SetLogoBitmap(arg0 *jni.Object) (*jni.Object, error)

SetLogoBitmap calls android.hardware.biometrics.BiometricPrompt$Builder.setLogoBitmap.

func (*PromptBuilder) SetLogoDescription added in v0.0.4

func (m *PromptBuilder) SetLogoDescription(arg0 string) (*jni.Object, error)

SetLogoDescription calls android.hardware.biometrics.BiometricPrompt$Builder.setLogoDescription.

func (*PromptBuilder) SetLogoRes added in v0.0.4

func (m *PromptBuilder) SetLogoRes(arg0 int32) (*jni.Object, error)

SetLogoRes calls android.hardware.biometrics.BiometricPrompt$Builder.setLogoRes.

func (*PromptBuilder) SetNegativeButton added in v0.0.4

func (m *PromptBuilder) SetNegativeButton(
	arg0 string,
	arg1 *jni.Object,
	arg2 *jni.Object,
) (*jni.Object, error)

SetNegativeButton calls android.hardware.biometrics.BiometricPrompt$Builder.setNegativeButton.

func (*PromptBuilder) SetSubtitle added in v0.0.4

func (m *PromptBuilder) SetSubtitle(arg0 string) (*jni.Object, error)

SetSubtitle calls android.hardware.biometrics.BiometricPrompt$Builder.setSubtitle.

func (*PromptBuilder) SetTitle added in v0.0.4

func (m *PromptBuilder) SetTitle(arg0 string) (*jni.Object, error)

SetTitle calls android.hardware.biometrics.BiometricPrompt$Builder.setTitle.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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