cardemulation

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 cardemulation provides Go bindings for android.nfc.cardemulation.

Index

Constants

View Source
const (
	DeactivationDeselected            = consts.DeactivationDeselected
	DeactivationLinkLoss              = consts.DeactivationLinkLoss
	Creator                           = consts.Creator
	PollingLoopTypeA                  = consts.PollingLoopTypeA
	PollingLoopTypeB                  = consts.PollingLoopTypeB
	PollingLoopTypeF                  = consts.PollingLoopTypeF
	PollingLoopTypeOff                = consts.PollingLoopTypeOff
	PollingLoopTypeOn                 = consts.PollingLoopTypeOn
	PollingLoopTypeUnknown            = consts.PollingLoopTypeUnknown
	NfcInternalErrorCommandTimeout    = consts.NfcInternalErrorCommandTimeout
	NfcInternalErrorNfcCrashRestart   = consts.NfcInternalErrorNfcCrashRestart
	NfcInternalErrorNfcHardwareError  = consts.NfcInternalErrorNfcHardwareError
	NfcInternalErrorUnknown           = consts.NfcInternalErrorUnknown
	ProtocolAndTechnologyRouteDefault = consts.ProtocolAndTechnologyRouteDefault
	ProtocolAndTechnologyRouteDh      = consts.ProtocolAndTechnologyRouteDh
	ProtocolAndTechnologyRouteEse     = consts.ProtocolAndTechnologyRouteEse
	ProtocolAndTechnologyRouteUicc    = consts.ProtocolAndTechnologyRouteUicc
	ProtocolAndTechnologyRouteUnset   = consts.ProtocolAndTechnologyRouteUnset
	SelectionModeAlwaysAsk            = consts.SelectionModeAlwaysAsk
	SelectionModeAskIfConflict        = consts.SelectionModeAskIfConflict
	SelectionModePreferDefault        = consts.SelectionModePreferDefault
)
View Source
const (
	ServiceInterface                = consts.ServiceInterface
	ServiceMetaData                 = consts.ServiceMetaData
	ActionChangeDefault             = consts.ActionChangeDefault
	CategoryOther                   = consts.CategoryOther
	CategoryPayment                 = consts.CategoryPayment
	ExtraCategory                   = consts.ExtraCategory
	ExtraServiceComponent           = consts.ExtraServiceComponent
	PropertyAllowSharedRolePriority = consts.PropertyAllowSharedRolePriority
)

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 CardEmulation

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

CardEmulation wraps android.nfc.cardemulation.CardEmulation.

func (*CardEmulation) CategoryAllowsForegroundPreference

func (m *CardEmulation) CategoryAllowsForegroundPreference(arg0 string) (bool, error)

CategoryAllowsForegroundPreference calls android.nfc.cardemulation.CardEmulation.categoryAllowsForegroundPreference.

func (*CardEmulation) GetDefaultNfcSubscriptionId

func (m *CardEmulation) GetDefaultNfcSubscriptionId() (int32, error)

GetDefaultNfcSubscriptionId calls android.nfc.cardemulation.CardEmulation.getDefaultNfcSubscriptionId.

func (*CardEmulation) GetDescriptionForPreferredPaymentService

func (m *CardEmulation) GetDescriptionForPreferredPaymentService() (*jni.Object, error)

GetDescriptionForPreferredPaymentService calls android.nfc.cardemulation.CardEmulation.getDescriptionForPreferredPaymentService.

func (*CardEmulation) GetRouteDestinationForPreferredPaymentService

func (m *CardEmulation) GetRouteDestinationForPreferredPaymentService() (string, error)

GetRouteDestinationForPreferredPaymentService calls android.nfc.cardemulation.CardEmulation.getRouteDestinationForPreferredPaymentService.

func (*CardEmulation) GetSelectionModeForCategory

func (m *CardEmulation) GetSelectionModeForCategory(arg0 string) (int32, error)

GetSelectionModeForCategory calls android.nfc.cardemulation.CardEmulation.getSelectionModeForCategory.

func (*CardEmulation) IsDefaultServiceForAid

func (m *CardEmulation) IsDefaultServiceForAid(arg0 *jni.Object, arg1 string) (bool, error)

IsDefaultServiceForAid calls android.nfc.cardemulation.CardEmulation.isDefaultServiceForAid.

func (*CardEmulation) IsDefaultServiceForCategory

func (m *CardEmulation) IsDefaultServiceForCategory(arg0 *jni.Object, arg1 string) (bool, error)

IsDefaultServiceForCategory calls android.nfc.cardemulation.CardEmulation.isDefaultServiceForCategory.

func (*CardEmulation) IsEuiccSupported

func (m *CardEmulation) IsEuiccSupported() (bool, error)

IsEuiccSupported calls android.nfc.cardemulation.CardEmulation.isEuiccSupported.

func (*CardEmulation) RegisterNfcEventCallback

func (m *CardEmulation) RegisterNfcEventCallback(arg0 *jni.Object, arg1 *jni.Object) error

RegisterNfcEventCallback calls android.nfc.cardemulation.CardEmulation.registerNfcEventCallback.

func (*CardEmulation) RegisterPollingLoopFilterForService

func (m *CardEmulation) RegisterPollingLoopFilterForService(
	arg0 *jni.Object,
	arg1 string,
	arg2 bool,
) (bool, error)

RegisterPollingLoopFilterForService calls android.nfc.cardemulation.CardEmulation.registerPollingLoopFilterForService.

func (*CardEmulation) RegisterPollingLoopPatternFilterForService

func (m *CardEmulation) RegisterPollingLoopPatternFilterForService(
	arg0 *jni.Object,
	arg1 string,
	arg2 bool,
) (bool, error)

RegisterPollingLoopPatternFilterForService calls android.nfc.cardemulation.CardEmulation.registerPollingLoopPatternFilterForService.

func (*CardEmulation) RemoveAidsForService

func (m *CardEmulation) RemoveAidsForService(arg0 *jni.Object, arg1 string) (bool, error)

RemoveAidsForService calls android.nfc.cardemulation.CardEmulation.removeAidsForService.

func (*CardEmulation) RemovePollingLoopFilterForService

func (m *CardEmulation) RemovePollingLoopFilterForService(arg0 *jni.Object, arg1 string) (bool, error)

RemovePollingLoopFilterForService calls android.nfc.cardemulation.CardEmulation.removePollingLoopFilterForService.

func (*CardEmulation) RemovePollingLoopPatternFilterForService

func (m *CardEmulation) RemovePollingLoopPatternFilterForService(arg0 *jni.Object, arg1 string) (bool, error)

RemovePollingLoopPatternFilterForService calls android.nfc.cardemulation.CardEmulation.removePollingLoopPatternFilterForService.

func (*CardEmulation) SetOffHostForService

func (m *CardEmulation) SetOffHostForService(arg0 *jni.Object, arg1 string) (bool, error)

SetOffHostForService calls android.nfc.cardemulation.CardEmulation.setOffHostForService.

func (*CardEmulation) SetPreferredService

func (m *CardEmulation) SetPreferredService(arg0 *jni.Object, arg1 *jni.Object) (bool, error)

SetPreferredService calls android.nfc.cardemulation.CardEmulation.setPreferredService.

func (*CardEmulation) SetShouldDefaultToObserveModeForService

func (m *CardEmulation) SetShouldDefaultToObserveModeForService(arg0 *jni.Object, arg1 bool) (bool, error)

SetShouldDefaultToObserveModeForService calls android.nfc.cardemulation.CardEmulation.setShouldDefaultToObserveModeForService.

func (*CardEmulation) SupportsAidPrefixRegistration

func (m *CardEmulation) SupportsAidPrefixRegistration() (bool, error)

SupportsAidPrefixRegistration calls android.nfc.cardemulation.CardEmulation.supportsAidPrefixRegistration.

func (*CardEmulation) UnregisterNfcEventCallback

func (m *CardEmulation) UnregisterNfcEventCallback(arg0 *jni.Object) error

UnregisterNfcEventCallback calls android.nfc.cardemulation.CardEmulation.unregisterNfcEventCallback.

func (*CardEmulation) UnsetOffHostForService

func (m *CardEmulation) UnsetOffHostForService(arg0 *jni.Object) (bool, error)

UnsetOffHostForService calls android.nfc.cardemulation.CardEmulation.unsetOffHostForService.

func (*CardEmulation) UnsetPreferredService

func (m *CardEmulation) UnsetPreferredService(arg0 *jni.Object) (bool, error)

UnsetPreferredService calls android.nfc.cardemulation.CardEmulation.unsetPreferredService.

type HostApduService

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

HostApduService wraps android.nfc.cardemulation.HostApduService.

func (*HostApduService) NotifyUnhandled

func (m *HostApduService) NotifyUnhandled() error

NotifyUnhandled calls android.nfc.cardemulation.HostApduService.notifyUnhandled.

func (*HostApduService) OnBind

func (m *HostApduService) OnBind(arg0 *jni.Object) (*jni.Object, error)

OnBind calls android.nfc.cardemulation.HostApduService.onBind.

func (*HostApduService) OnDeactivated

func (m *HostApduService) OnDeactivated(arg0 int32) error

OnDeactivated calls android.nfc.cardemulation.HostApduService.onDeactivated.

func (*HostApduService) ProcessCommandApdu

func (m *HostApduService) ProcessCommandApdu(arg0 *jni.Object, arg1 *jni.Object) (*jni.Object, error)

ProcessCommandApdu calls android.nfc.cardemulation.HostApduService.processCommandApdu.

func (*HostApduService) SendResponseApdu

func (m *HostApduService) SendResponseApdu(arg0 *jni.Object) error

SendResponseApdu calls android.nfc.cardemulation.HostApduService.sendResponseApdu.

type HostNfcFService

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

HostNfcFService wraps android.nfc.cardemulation.HostNfcFService.

func (*HostNfcFService) OnBind

func (m *HostNfcFService) OnBind(arg0 *jni.Object) (*jni.Object, error)

OnBind calls android.nfc.cardemulation.HostNfcFService.onBind.

func (*HostNfcFService) OnDeactivated

func (m *HostNfcFService) OnDeactivated(arg0 int32) error

OnDeactivated calls android.nfc.cardemulation.HostNfcFService.onDeactivated.

func (*HostNfcFService) ProcessNfcFPacket

func (m *HostNfcFService) ProcessNfcFPacket(arg0 *jni.Object, arg1 *jni.Object) (*jni.Object, error)

ProcessNfcFPacket calls android.nfc.cardemulation.HostNfcFService.processNfcFPacket.

func (*HostNfcFService) SendResponsePacket

func (m *HostNfcFService) SendResponsePacket(arg0 *jni.Object) error

SendResponsePacket calls android.nfc.cardemulation.HostNfcFService.sendResponsePacket.

type NfcFCardEmulation

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

NfcFCardEmulation wraps android.nfc.cardemulation.NfcFCardEmulation.

func (*NfcFCardEmulation) DisableService

func (m *NfcFCardEmulation) DisableService(arg0 *jni.Object) (bool, error)

DisableService calls android.nfc.cardemulation.NfcFCardEmulation.disableService.

func (*NfcFCardEmulation) EnableService

func (m *NfcFCardEmulation) EnableService(arg0 *jni.Object, arg1 *jni.Object) (bool, error)

EnableService calls android.nfc.cardemulation.NfcFCardEmulation.enableService.

func (*NfcFCardEmulation) GetNfcid2ForService

func (m *NfcFCardEmulation) GetNfcid2ForService(arg0 *jni.Object) (string, error)

GetNfcid2ForService calls android.nfc.cardemulation.NfcFCardEmulation.getNfcid2ForService.

func (*NfcFCardEmulation) GetSystemCodeForService

func (m *NfcFCardEmulation) GetSystemCodeForService(arg0 *jni.Object) (string, error)

GetSystemCodeForService calls android.nfc.cardemulation.NfcFCardEmulation.getSystemCodeForService.

func (*NfcFCardEmulation) RegisterSystemCodeForService

func (m *NfcFCardEmulation) RegisterSystemCodeForService(arg0 *jni.Object, arg1 string) (bool, error)

RegisterSystemCodeForService calls android.nfc.cardemulation.NfcFCardEmulation.registerSystemCodeForService.

func (*NfcFCardEmulation) SetNfcid2ForService

func (m *NfcFCardEmulation) SetNfcid2ForService(arg0 *jni.Object, arg1 string) (bool, error)

SetNfcid2ForService calls android.nfc.cardemulation.NfcFCardEmulation.setNfcid2ForService.

func (*NfcFCardEmulation) UnregisterSystemCodeForService

func (m *NfcFCardEmulation) UnregisterSystemCodeForService(arg0 *jni.Object) (bool, error)

UnregisterSystemCodeForService calls android.nfc.cardemulation.NfcFCardEmulation.unregisterSystemCodeForService.

type OffHostApduService

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

OffHostApduService wraps android.nfc.cardemulation.OffHostApduService.

func (*OffHostApduService) OnBind

func (m *OffHostApduService) OnBind(arg0 *jni.Object) (*jni.Object, error)

OnBind calls android.nfc.cardemulation.OffHostApduService.onBind.

type PollingFrame

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

PollingFrame wraps android.nfc.cardemulation.PollingFrame.

func (*PollingFrame) DescribeContents

func (m *PollingFrame) DescribeContents() (int32, error)

DescribeContents calls android.nfc.cardemulation.PollingFrame.describeContents.

func (*PollingFrame) GetData

func (m *PollingFrame) GetData() (*jni.Object, error)

GetData calls android.nfc.cardemulation.PollingFrame.getData.

func (*PollingFrame) GetTimestamp

func (m *PollingFrame) GetTimestamp() (int64, error)

GetTimestamp calls android.nfc.cardemulation.PollingFrame.getTimestamp.

func (*PollingFrame) GetTriggeredAutoTransact

func (m *PollingFrame) GetTriggeredAutoTransact() (bool, error)

GetTriggeredAutoTransact calls android.nfc.cardemulation.PollingFrame.getTriggeredAutoTransact.

func (*PollingFrame) GetType

func (m *PollingFrame) GetType() (int32, error)

GetType calls android.nfc.cardemulation.PollingFrame.getType.

func (*PollingFrame) GetVendorSpecificGain

func (m *PollingFrame) GetVendorSpecificGain() (int32, error)

GetVendorSpecificGain calls android.nfc.cardemulation.PollingFrame.getVendorSpecificGain.

func (*PollingFrame) ToString

func (m *PollingFrame) ToString() (string, error)

ToString calls android.nfc.cardemulation.PollingFrame.toString.

func (*PollingFrame) WriteToParcel

func (m *PollingFrame) WriteToParcel(arg0 *jni.Object, arg1 int32) error

WriteToParcel calls android.nfc.cardemulation.PollingFrame.writeToParcel.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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