bluetooth

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

Index

Constants

View Source
const (
	ActionAclConnected           = consts.ActionAclConnected
	ActionAclDisconnected        = consts.ActionAclDisconnected
	ActionAclDisconnectRequested = consts.ActionAclDisconnectRequested
	ActionAliasChanged           = consts.ActionAliasChanged
	ActionBondStateChanged       = consts.ActionBondStateChanged
	ActionClassChanged           = consts.ActionClassChanged
	ActionEncryptionChange       = consts.ActionEncryptionChange
	ActionFound                  = consts.ActionFound
	ActionKeyMissing             = consts.ActionKeyMissing
	ActionNameChanged            = consts.ActionNameChanged
	ActionPairingRequest         = consts.ActionPairingRequest
	ActionUuid                   = consts.ActionUuid
	ExtraBondState               = consts.ExtraBondState
	ExtraClass                   = consts.ExtraClass
	ExtraDevice                  = consts.ExtraDevice
	ExtraEncryptionAlgorithm     = consts.ExtraEncryptionAlgorithm
	ExtraEncryptionEnabled       = consts.ExtraEncryptionEnabled
	ExtraEncryptionStatus        = consts.ExtraEncryptionStatus
	ExtraIsCoordinatedSetMember  = consts.ExtraIsCoordinatedSetMember
	ExtraKeySize                 = consts.ExtraKeySize
	ExtraName                    = consts.ExtraName
	ExtraPairingKey              = consts.ExtraPairingKey
	ExtraPairingVariant          = consts.ExtraPairingVariant
	ExtraPreviousBondState       = consts.ExtraPreviousBondState
	ExtraRssi                    = consts.ExtraRssi
	ExtraTransport               = consts.ExtraTransport
	ExtraUuid                    = consts.ExtraUuid
	ActionConnectionStateChanged = consts.ActionConnectionStateChanged
	ActionDiscoveryFinished      = consts.ActionDiscoveryFinished
	ActionDiscoveryStarted       = consts.ActionDiscoveryStarted
	ActionLocalNameChanged       = consts.ActionLocalNameChanged
	ActionRequestDiscoverable    = consts.ActionRequestDiscoverable
	ActionRequestEnable          = consts.ActionRequestEnable
	ActionScanModeChanged        = consts.ActionScanModeChanged
	ActionStateChanged           = consts.ActionStateChanged
	ExtraConnectionState         = consts.ExtraConnectionState
	ExtraDiscoverableDuration    = consts.ExtraDiscoverableDuration
	ExtraLocalName               = consts.ExtraLocalName
	ExtraPreviousConnectionState = consts.ExtraPreviousConnectionState
	ExtraPreviousScanMode        = consts.ExtraPreviousScanMode
	ExtraPreviousState           = consts.ExtraPreviousState
	ExtraScanMode                = consts.ExtraScanMode
	ExtraState                   = consts.ExtraState
)
View Source
const (
	AddressTypeAnonymous              = consts.AddressTypeAnonymous
	AddressTypePublic                 = consts.AddressTypePublic
	AddressTypeRandom                 = consts.AddressTypeRandom
	AddressTypeUnknown                = consts.AddressTypeUnknown
	BondBonded                        = consts.BondBonded
	BondBonding                       = consts.BondBonding
	BondNone                          = consts.BondNone
	Creator                           = consts.Creator
	DeviceTypeClassic                 = consts.DeviceTypeClassic
	DeviceTypeDual                    = consts.DeviceTypeDual
	DeviceTypeLe                      = consts.DeviceTypeLe
	DeviceTypeUnknown                 = consts.DeviceTypeUnknown
	EncryptionAlgorithmAes            = consts.EncryptionAlgorithmAes
	EncryptionAlgorithmE0             = consts.EncryptionAlgorithmE0
	EncryptionAlgorithmNone           = consts.EncryptionAlgorithmNone
	Error                             = consts.Error
	PairingVariantPasskeyConfirmation = consts.PairingVariantPasskeyConfirmation
	PairingVariantPin                 = consts.PairingVariantPin
	PhyLe1m                           = consts.PhyLe1m
	PhyLe1mMask                       = consts.PhyLe1mMask
	PhyLe2m                           = consts.PhyLe2m
	PhyLe2mMask                       = consts.PhyLe2mMask
	PhyLeCoded                        = consts.PhyLeCoded
	PhyLeCodedMask                    = consts.PhyLeCodedMask
	PhyOptionNoPreferred              = consts.PhyOptionNoPreferred
	PhyOptionS2                       = consts.PhyOptionS2
	PhyOptionS8                       = consts.PhyOptionS8
	TransportAuto                     = consts.TransportAuto
	TransportBredr                    = consts.TransportBredr
	TransportLe                       = consts.TransportLe
	FormatFloat                       = consts.FormatFloat
	FormatSfloat                      = consts.FormatSfloat
	FormatSint16                      = consts.FormatSint16
	FormatSint32                      = consts.FormatSint32
	FormatSint8                       = consts.FormatSint8
	FormatUint16                      = consts.FormatUint16
	FormatUint32                      = consts.FormatUint32
	FormatUint8                       = consts.FormatUint8
	PermissionRead                    = consts.PermissionRead
	PermissionReadEncrypted           = consts.PermissionReadEncrypted
	PermissionReadEncryptedMitm       = consts.PermissionReadEncryptedMitm
	PermissionWrite                   = consts.PermissionWrite
	PermissionWriteEncrypted          = consts.PermissionWriteEncrypted
	PermissionWriteEncryptedMitm      = consts.PermissionWriteEncryptedMitm
	PermissionWriteSigned             = consts.PermissionWriteSigned
	PermissionWriteSignedMitm         = consts.PermissionWriteSignedMitm
	PropertyBroadcast                 = consts.PropertyBroadcast
	PropertyExtendedProps             = consts.PropertyExtendedProps
	PropertyIndicate                  = consts.PropertyIndicate
	PropertyNotify                    = consts.PropertyNotify
	PropertyRead                      = consts.PropertyRead
	PropertySignedWrite               = consts.PropertySignedWrite
	PropertyWrite                     = consts.PropertyWrite
	PropertyWriteNoResponse           = consts.PropertyWriteNoResponse
	WriteTypeDefault                  = consts.WriteTypeDefault
	WriteTypeNoResponse               = consts.WriteTypeNoResponse
	WriteTypeSigned                   = consts.WriteTypeSigned
	ServiceTypePrimary                = consts.ServiceTypePrimary
	ServiceTypeSecondary              = consts.ServiceTypeSecondary
	DisableNotificationValue          = consts.DisableNotificationValue
	EnableIndicationValue             = consts.EnableIndicationValue
	EnableNotificationValue           = consts.EnableNotificationValue
	TypeL2cap                         = consts.TypeL2cap
	TypeLe                            = consts.TypeLe
	TypeRfcomm                        = consts.TypeRfcomm
	TypeSco                           = consts.TypeSco
	ConnectionPriorityBalanced        = consts.ConnectionPriorityBalanced
	ConnectionPriorityDck             = consts.ConnectionPriorityDck
	ConnectionPriorityHigh            = consts.ConnectionPriorityHigh
	ConnectionPriorityLowPower        = consts.ConnectionPriorityLowPower
	GattConnectionCongested           = consts.GattConnectionCongested
	GattConnectionTimeout             = consts.GattConnectionTimeout
	GattFailure                       = consts.GattFailure
	GattInsufficientAuthentication    = consts.GattInsufficientAuthentication
	GattInsufficientAuthorization     = consts.GattInsufficientAuthorization
	GattInsufficientEncryption        = consts.GattInsufficientEncryption
	GattInvalidAttributeLength        = consts.GattInvalidAttributeLength
	GattInvalidOffset                 = consts.GattInvalidOffset
	GattReadNotPermitted              = consts.GattReadNotPermitted
	GattRequestNotSupported           = consts.GattRequestNotSupported
	GattSuccess                       = consts.GattSuccess
	GattWriteNotPermitted             = consts.GattWriteNotPermitted
	ScanModeConnectable               = consts.ScanModeConnectable
	ScanModeConnectableDiscoverable   = consts.ScanModeConnectableDiscoverable
	ScanModeNone                      = consts.ScanModeNone
	StateConnected                    = consts.StateConnected
	StateConnecting                   = consts.StateConnecting
	StateDisconnected                 = consts.StateDisconnected
	StateDisconnecting                = consts.StateDisconnecting
	StateOff                          = consts.StateOff
	StateOn                           = consts.StateOn
	StateTurningOff                   = consts.StateTurningOff
	StateTurningOn                    = consts.StateTurningOn
)

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

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

Adapter wraps android.bluetooth.BluetoothAdapter.

func NewAdapter added in v0.0.4

func NewAdapter(ctx *app.Context) (*Adapter, error)

NewAdapter obtains the BluetoothAdapter via BluetoothManager system service.

func (*Adapter) CancelDiscovery added in v0.0.4

func (m *Adapter) CancelDiscovery() (bool, error)

CancelDiscovery calls android.bluetooth.BluetoothAdapter.cancelDiscovery.

func (*Adapter) CheckBluetoothAddress added in v0.0.4

func (m *Adapter) CheckBluetoothAddress(arg0 string) (bool, error)

CheckBluetoothAddress calls android.bluetooth.BluetoothAdapter.checkBluetoothAddress.

func (*Adapter) Close added in v0.0.4

func (m *Adapter) Close()

Close releases the global reference to the underlying Java object.

func (*Adapter) CloseProfileProxy added in v0.0.4

func (m *Adapter) CloseProfileProxy(arg0 int32, arg1 *jni.Object) error

CloseProfileProxy calls android.bluetooth.BluetoothAdapter.closeProfileProxy.

func (*Adapter) Disable added in v0.0.4

func (m *Adapter) Disable() (bool, error)

Disable calls android.bluetooth.BluetoothAdapter.disable.

func (*Adapter) Enable added in v0.0.4

func (m *Adapter) Enable() (bool, error)

Enable calls android.bluetooth.BluetoothAdapter.enable.

func (*Adapter) GetAddress added in v0.0.4

func (m *Adapter) GetAddress() (string, error)

GetAddress calls android.bluetooth.BluetoothAdapter.getAddress.

func (*Adapter) GetBluetoothLeAdvertiser added in v0.0.4

func (m *Adapter) GetBluetoothLeAdvertiser() (*jni.Object, error)

GetBluetoothLeAdvertiser calls android.bluetooth.BluetoothAdapter.getBluetoothLeAdvertiser.

func (*Adapter) GetBluetoothLeScanner added in v0.0.4

func (m *Adapter) GetBluetoothLeScanner() (*jni.Object, error)

GetBluetoothLeScanner calls android.bluetooth.BluetoothAdapter.getBluetoothLeScanner.

func (*Adapter) GetBondedDevices added in v0.0.4

func (m *Adapter) GetBondedDevices() (*jni.Object, error)

GetBondedDevices calls android.bluetooth.BluetoothAdapter.getBondedDevices.

func (*Adapter) GetDiscoverableTimeout added in v0.0.4

func (m *Adapter) GetDiscoverableTimeout() (*jni.Object, error)

GetDiscoverableTimeout calls android.bluetooth.BluetoothAdapter.getDiscoverableTimeout.

func (*Adapter) GetLeMaximumAdvertisingDataLength added in v0.0.4

func (m *Adapter) GetLeMaximumAdvertisingDataLength() (int32, error)

GetLeMaximumAdvertisingDataLength calls android.bluetooth.BluetoothAdapter.getLeMaximumAdvertisingDataLength.

func (*Adapter) GetMaxConnectedAudioDevices added in v0.0.4

func (m *Adapter) GetMaxConnectedAudioDevices() (int32, error)

GetMaxConnectedAudioDevices calls android.bluetooth.BluetoothAdapter.getMaxConnectedAudioDevices.

func (*Adapter) GetName added in v0.0.4

func (m *Adapter) GetName() (string, error)

GetName calls android.bluetooth.BluetoothAdapter.getName.

func (*Adapter) GetProfileConnectionState added in v0.0.4

func (m *Adapter) GetProfileConnectionState(arg0 int32) (int32, error)

GetProfileConnectionState calls android.bluetooth.BluetoothAdapter.getProfileConnectionState.

func (*Adapter) GetProfileProxy added in v0.0.4

func (m *Adapter) GetProfileProxy(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 int32,
) (bool, error)

GetProfileProxy calls android.bluetooth.BluetoothAdapter.getProfileProxy.

func (*Adapter) GetRemoteDevice1 added in v0.0.4

func (m *Adapter) GetRemoteDevice1(arg0 *jni.Object) (*jni.Object, error)

GetRemoteDevice1 calls android.bluetooth.BluetoothAdapter.getRemoteDevice.

func (*Adapter) GetRemoteDevice1_1 added in v0.0.4

func (m *Adapter) GetRemoteDevice1_1(arg0 string) (*jni.Object, error)

GetRemoteDevice1_1 calls android.bluetooth.BluetoothAdapter.getRemoteDevice.

func (*Adapter) GetRemoteLeDevice added in v0.0.4

func (m *Adapter) GetRemoteLeDevice(arg0 string, arg1 int32) (*jni.Object, error)

GetRemoteLeDevice calls android.bluetooth.BluetoothAdapter.getRemoteLeDevice.

func (*Adapter) GetScanMode added in v0.0.4

func (m *Adapter) GetScanMode() (int32, error)

GetScanMode calls android.bluetooth.BluetoothAdapter.getScanMode.

func (*Adapter) GetState added in v0.0.4

func (m *Adapter) GetState() (int32, error)

GetState calls android.bluetooth.BluetoothAdapter.getState.

func (*Adapter) IsDiscovering added in v0.0.4

func (m *Adapter) IsDiscovering() (bool, error)

IsDiscovering calls android.bluetooth.BluetoothAdapter.isDiscovering.

func (*Adapter) IsEnabled added in v0.0.4

func (m *Adapter) IsEnabled() (bool, error)

IsEnabled calls android.bluetooth.BluetoothAdapter.isEnabled.

func (*Adapter) IsLe2MPhySupported added in v0.0.4

func (m *Adapter) IsLe2MPhySupported() (bool, error)

IsLe2MPhySupported calls android.bluetooth.BluetoothAdapter.isLe2MPhySupported.

func (*Adapter) IsLeAudioBroadcastAssistantSupported added in v0.0.4

func (m *Adapter) IsLeAudioBroadcastAssistantSupported() (int32, error)

IsLeAudioBroadcastAssistantSupported calls android.bluetooth.BluetoothAdapter.isLeAudioBroadcastAssistantSupported.

func (*Adapter) IsLeAudioBroadcastSourceSupported added in v0.0.4

func (m *Adapter) IsLeAudioBroadcastSourceSupported() (int32, error)

IsLeAudioBroadcastSourceSupported calls android.bluetooth.BluetoothAdapter.isLeAudioBroadcastSourceSupported.

func (*Adapter) IsLeAudioSupported added in v0.0.4

func (m *Adapter) IsLeAudioSupported() (int32, error)

IsLeAudioSupported calls android.bluetooth.BluetoothAdapter.isLeAudioSupported.

func (*Adapter) IsLeCodedPhySupported added in v0.0.4

func (m *Adapter) IsLeCodedPhySupported() (bool, error)

IsLeCodedPhySupported calls android.bluetooth.BluetoothAdapter.isLeCodedPhySupported.

func (*Adapter) IsLeExtendedAdvertisingSupported added in v0.0.4

func (m *Adapter) IsLeExtendedAdvertisingSupported() (bool, error)

IsLeExtendedAdvertisingSupported calls android.bluetooth.BluetoothAdapter.isLeExtendedAdvertisingSupported.

func (*Adapter) IsLePeriodicAdvertisingSupported added in v0.0.4

func (m *Adapter) IsLePeriodicAdvertisingSupported() (bool, error)

IsLePeriodicAdvertisingSupported calls android.bluetooth.BluetoothAdapter.isLePeriodicAdvertisingSupported.

func (*Adapter) IsMultipleAdvertisementSupported added in v0.0.4

func (m *Adapter) IsMultipleAdvertisementSupported() (bool, error)

IsMultipleAdvertisementSupported calls android.bluetooth.BluetoothAdapter.isMultipleAdvertisementSupported.

func (*Adapter) IsOffloadedFilteringSupported added in v0.0.4

func (m *Adapter) IsOffloadedFilteringSupported() (bool, error)

IsOffloadedFilteringSupported calls android.bluetooth.BluetoothAdapter.isOffloadedFilteringSupported.

func (*Adapter) IsOffloadedScanBatchingSupported added in v0.0.4

func (m *Adapter) IsOffloadedScanBatchingSupported() (bool, error)

IsOffloadedScanBatchingSupported calls android.bluetooth.BluetoothAdapter.isOffloadedScanBatchingSupported.

func (*Adapter) ListenUsingInsecureL2capChannel added in v0.0.4

func (m *Adapter) ListenUsingInsecureL2capChannel() (*jni.Object, error)

ListenUsingInsecureL2capChannel calls android.bluetooth.BluetoothAdapter.listenUsingInsecureL2capChannel.

func (*Adapter) ListenUsingInsecureRfcommWithServiceRecord added in v0.0.4

func (m *Adapter) ListenUsingInsecureRfcommWithServiceRecord(arg0 string, arg1 *jni.Object) (*jni.Object, error)

ListenUsingInsecureRfcommWithServiceRecord calls android.bluetooth.BluetoothAdapter.listenUsingInsecureRfcommWithServiceRecord.

func (*Adapter) ListenUsingL2capChannel added in v0.0.4

func (m *Adapter) ListenUsingL2capChannel() (*jni.Object, error)

ListenUsingL2capChannel calls android.bluetooth.BluetoothAdapter.listenUsingL2capChannel.

func (*Adapter) ListenUsingRfcommWithServiceRecord added in v0.0.4

func (m *Adapter) ListenUsingRfcommWithServiceRecord(arg0 string, arg1 *jni.Object) (*jni.Object, error)

ListenUsingRfcommWithServiceRecord calls android.bluetooth.BluetoothAdapter.listenUsingRfcommWithServiceRecord.

func (*Adapter) ListenUsingSocketSettings added in v0.0.4

func (m *Adapter) ListenUsingSocketSettings(arg0 *jni.Object) (*jni.Object, error)

ListenUsingSocketSettings calls android.bluetooth.BluetoothAdapter.listenUsingSocketSettings.

func (*Adapter) SetName added in v0.0.4

func (m *Adapter) SetName(arg0 string) (bool, error)

SetName calls android.bluetooth.BluetoothAdapter.setName.

func (*Adapter) StartDiscovery added in v0.0.4

func (m *Adapter) StartDiscovery() (bool, error)

StartDiscovery calls android.bluetooth.BluetoothAdapter.startDiscovery.

func (*Adapter) StartLeScan1 added in v0.0.4

func (m *Adapter) StartLeScan1(arg0 *jni.Object) (bool, error)

StartLeScan1 calls android.bluetooth.BluetoothAdapter.startLeScan.

func (*Adapter) StartLeScan2_1 added in v0.0.4

func (m *Adapter) StartLeScan2_1(arg0 *jni.Object, arg1 *jni.Object) (bool, error)

StartLeScan2_1 calls android.bluetooth.BluetoothAdapter.startLeScan.

func (*Adapter) StopLeScan added in v0.0.4

func (m *Adapter) StopLeScan(arg0 *jni.Object) error

StopLeScan calls android.bluetooth.BluetoothAdapter.stopLeScan.

type Device added in v0.0.4

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

Device wraps android.bluetooth.BluetoothDevice.

func (*Device) ConnectGatt3 added in v0.0.4

func (m *Device) ConnectGatt3(
	arg0 *jni.Object,
	arg1 bool,
	arg2 *jni.Object,
) (*jni.Object, error)

ConnectGatt3 calls android.bluetooth.BluetoothDevice.connectGatt.

func (*Device) ConnectGatt4_1 added in v0.0.4

func (m *Device) ConnectGatt4_1(
	arg0 *jni.Object,
	arg1 bool,
	arg2 *jni.Object,
	arg3 int32,
) (*jni.Object, error)

ConnectGatt4_1 calls android.bluetooth.BluetoothDevice.connectGatt.

func (*Device) ConnectGatt5_2 added in v0.0.4

func (m *Device) ConnectGatt5_2(
	arg0 *jni.Object,
	arg1 bool,
	arg2 *jni.Object,
	arg3 int32,
	arg4 int32,
) (*jni.Object, error)

ConnectGatt5_2 calls android.bluetooth.BluetoothDevice.connectGatt.

func (*Device) CreateBond added in v0.0.4

func (m *Device) CreateBond() (bool, error)

CreateBond calls android.bluetooth.BluetoothDevice.createBond.

func (*Device) CreateInsecureL2capChannel added in v0.0.4

func (m *Device) CreateInsecureL2capChannel(arg0 int32) (*jni.Object, error)

CreateInsecureL2capChannel calls android.bluetooth.BluetoothDevice.createInsecureL2capChannel.

func (*Device) CreateInsecureRfcommSocketToServiceRecord added in v0.0.4

func (m *Device) CreateInsecureRfcommSocketToServiceRecord(arg0 *jni.Object) (*jni.Object, error)

CreateInsecureRfcommSocketToServiceRecord calls android.bluetooth.BluetoothDevice.createInsecureRfcommSocketToServiceRecord.

func (*Device) CreateL2capChannel added in v0.0.4

func (m *Device) CreateL2capChannel(arg0 int32) (*jni.Object, error)

CreateL2capChannel calls android.bluetooth.BluetoothDevice.createL2capChannel.

func (*Device) CreateRfcommSocketToServiceRecord added in v0.0.4

func (m *Device) CreateRfcommSocketToServiceRecord(arg0 *jni.Object) (*jni.Object, error)

CreateRfcommSocketToServiceRecord calls android.bluetooth.BluetoothDevice.createRfcommSocketToServiceRecord.

func (*Device) CreateUsingSocketSettings added in v0.0.4

func (m *Device) CreateUsingSocketSettings(arg0 *jni.Object) (*jni.Object, error)

CreateUsingSocketSettings calls android.bluetooth.BluetoothDevice.createUsingSocketSettings.

func (*Device) DescribeContents added in v0.0.4

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

DescribeContents calls android.bluetooth.BluetoothDevice.describeContents.

func (*Device) Equals added in v0.0.4

func (m *Device) Equals(arg0 *jni.Object) (bool, error)

Equals calls android.bluetooth.BluetoothDevice.equals.

func (*Device) FetchUuidsWithSdp added in v0.0.4

func (m *Device) FetchUuidsWithSdp() (bool, error)

FetchUuidsWithSdp calls android.bluetooth.BluetoothDevice.fetchUuidsWithSdp.

func (*Device) GetAddress added in v0.0.4

func (m *Device) GetAddress() (string, error)

GetAddress calls android.bluetooth.BluetoothDevice.getAddress.

func (*Device) GetAddressType added in v0.0.4

func (m *Device) GetAddressType() (int32, error)

GetAddressType calls android.bluetooth.BluetoothDevice.getAddressType.

func (*Device) GetAlias added in v0.0.4

func (m *Device) GetAlias() (string, error)

GetAlias calls android.bluetooth.BluetoothDevice.getAlias.

func (*Device) GetBluetoothClass added in v0.0.4

func (m *Device) GetBluetoothClass() (*jni.Object, error)

GetBluetoothClass calls android.bluetooth.BluetoothDevice.getBluetoothClass.

func (*Device) GetBondState added in v0.0.4

func (m *Device) GetBondState() (int32, error)

GetBondState calls android.bluetooth.BluetoothDevice.getBondState.

func (*Device) GetIdentityAddressWithType added in v0.0.4

func (m *Device) GetIdentityAddressWithType() (*jni.Object, error)

GetIdentityAddressWithType calls android.bluetooth.BluetoothDevice.getIdentityAddressWithType.

func (*Device) GetName added in v0.0.4

func (m *Device) GetName() (string, error)

GetName calls android.bluetooth.BluetoothDevice.getName.

func (*Device) GetType added in v0.0.4

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

GetType calls android.bluetooth.BluetoothDevice.getType.

func (*Device) GetUuids added in v0.0.4

func (m *Device) GetUuids() (*jni.Object, error)

GetUuids calls android.bluetooth.BluetoothDevice.getUuids.

func (*Device) HashCode added in v0.0.4

func (m *Device) HashCode() (int32, error)

HashCode calls android.bluetooth.BluetoothDevice.hashCode.

func (*Device) SetAlias added in v0.0.4

func (m *Device) SetAlias(arg0 string) (int32, error)

SetAlias calls android.bluetooth.BluetoothDevice.setAlias.

func (*Device) SetPairingConfirmation added in v0.0.4

func (m *Device) SetPairingConfirmation(arg0 bool) (bool, error)

SetPairingConfirmation calls android.bluetooth.BluetoothDevice.setPairingConfirmation.

func (*Device) SetPin added in v0.0.4

func (m *Device) SetPin(arg0 *jni.Object) (bool, error)

SetPin calls android.bluetooth.BluetoothDevice.setPin.

func (*Device) ToString added in v0.0.4

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

ToString calls android.bluetooth.BluetoothDevice.toString.

func (*Device) WriteToParcel added in v0.0.4

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

WriteToParcel calls android.bluetooth.BluetoothDevice.writeToParcel.

type Gatt added in v0.0.4

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

Gatt wraps android.bluetooth.BluetoothGatt.

func (*Gatt) AbortReliableWrite0 added in v0.0.4

func (m *Gatt) AbortReliableWrite0() error

AbortReliableWrite0 calls android.bluetooth.BluetoothGatt.abortReliableWrite.

func (*Gatt) AbortReliableWrite1_1 added in v0.0.4

func (m *Gatt) AbortReliableWrite1_1(arg0 *jni.Object) error

AbortReliableWrite1_1 calls android.bluetooth.BluetoothGatt.abortReliableWrite.

func (*Gatt) BeginReliableWrite added in v0.0.4

func (m *Gatt) BeginReliableWrite() (bool, error)

BeginReliableWrite calls android.bluetooth.BluetoothGatt.beginReliableWrite.

func (*Gatt) Close added in v0.0.4

func (m *Gatt) Close() error

Close calls android.bluetooth.BluetoothGatt.close.

func (*Gatt) Connect added in v0.0.4

func (m *Gatt) Connect() (bool, error)

Connect calls android.bluetooth.BluetoothGatt.connect.

func (*Gatt) Disconnect added in v0.0.4

func (m *Gatt) Disconnect() error

Disconnect calls android.bluetooth.BluetoothGatt.disconnect.

func (*Gatt) DiscoverServices added in v0.0.4

func (m *Gatt) DiscoverServices() (bool, error)

DiscoverServices calls android.bluetooth.BluetoothGatt.discoverServices.

func (*Gatt) ExecuteReliableWrite added in v0.0.4

func (m *Gatt) ExecuteReliableWrite() (bool, error)

ExecuteReliableWrite calls android.bluetooth.BluetoothGatt.executeReliableWrite.

func (*Gatt) GetConnectedDevices added in v0.0.4

func (m *Gatt) GetConnectedDevices() (*jni.Object, error)

GetConnectedDevices calls android.bluetooth.BluetoothGatt.getConnectedDevices.

func (*Gatt) GetConnectionState added in v0.0.4

func (m *Gatt) GetConnectionState(arg0 *jni.Object) (int32, error)

GetConnectionState calls android.bluetooth.BluetoothGatt.getConnectionState.

func (*Gatt) GetDevice added in v0.0.4

func (m *Gatt) GetDevice() (*jni.Object, error)

GetDevice calls android.bluetooth.BluetoothGatt.getDevice.

func (*Gatt) GetDevicesMatchingConnectionStates added in v0.0.4

func (m *Gatt) GetDevicesMatchingConnectionStates(arg0 *jni.Object) (*jni.Object, error)

GetDevicesMatchingConnectionStates calls android.bluetooth.BluetoothGatt.getDevicesMatchingConnectionStates.

func (*Gatt) GetService added in v0.0.4

func (m *Gatt) GetService(arg0 *jni.Object) (*jni.Object, error)

GetService calls android.bluetooth.BluetoothGatt.getService.

func (*Gatt) GetServices added in v0.0.4

func (m *Gatt) GetServices() (*jni.Object, error)

GetServices calls android.bluetooth.BluetoothGatt.getServices.

func (*Gatt) ReadCharacteristic added in v0.0.4

func (m *Gatt) ReadCharacteristic(arg0 *jni.Object) (bool, error)

ReadCharacteristic calls android.bluetooth.BluetoothGatt.readCharacteristic.

func (*Gatt) ReadDescriptor added in v0.0.4

func (m *Gatt) ReadDescriptor(arg0 *jni.Object) (bool, error)

ReadDescriptor calls android.bluetooth.BluetoothGatt.readDescriptor.

func (*Gatt) ReadPhy added in v0.0.4

func (m *Gatt) ReadPhy() error

ReadPhy calls android.bluetooth.BluetoothGatt.readPhy.

func (*Gatt) ReadRemoteRssi added in v0.0.4

func (m *Gatt) ReadRemoteRssi() (bool, error)

ReadRemoteRssi calls android.bluetooth.BluetoothGatt.readRemoteRssi.

func (*Gatt) RequestConnectionPriority added in v0.0.4

func (m *Gatt) RequestConnectionPriority(arg0 int32) (bool, error)

RequestConnectionPriority calls android.bluetooth.BluetoothGatt.requestConnectionPriority.

func (*Gatt) RequestMtu added in v0.0.4

func (m *Gatt) RequestMtu(arg0 int32) (bool, error)

RequestMtu calls android.bluetooth.BluetoothGatt.requestMtu.

func (*Gatt) SetCharacteristicNotification added in v0.0.4

func (m *Gatt) SetCharacteristicNotification(arg0 *jni.Object, arg1 bool) (bool, error)

SetCharacteristicNotification calls android.bluetooth.BluetoothGatt.setCharacteristicNotification.

func (*Gatt) SetPreferredPhy added in v0.0.4

func (m *Gatt) SetPreferredPhy(
	arg0 int32,
	arg1 int32,
	arg2 int32,
) error

SetPreferredPhy calls android.bluetooth.BluetoothGatt.setPreferredPhy.

func (*Gatt) WriteCharacteristic1 added in v0.0.4

func (m *Gatt) WriteCharacteristic1(arg0 *jni.Object) (bool, error)

WriteCharacteristic1 calls android.bluetooth.BluetoothGatt.writeCharacteristic.

func (*Gatt) WriteCharacteristic3_1 added in v0.0.4

func (m *Gatt) WriteCharacteristic3_1(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 int32,
) (int32, error)

WriteCharacteristic3_1 calls android.bluetooth.BluetoothGatt.writeCharacteristic.

func (*Gatt) WriteDescriptor1 added in v0.0.4

func (m *Gatt) WriteDescriptor1(arg0 *jni.Object) (bool, error)

WriteDescriptor1 calls android.bluetooth.BluetoothGatt.writeDescriptor.

func (*Gatt) WriteDescriptor2_1 added in v0.0.4

func (m *Gatt) WriteDescriptor2_1(arg0 *jni.Object, arg1 *jni.Object) (int32, error)

WriteDescriptor2_1 calls android.bluetooth.BluetoothGatt.writeDescriptor.

type GattCharacteristic added in v0.0.4

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

GattCharacteristic wraps android.bluetooth.BluetoothGattCharacteristic.

func (*GattCharacteristic) AddDescriptor added in v0.0.4

func (m *GattCharacteristic) AddDescriptor(arg0 *jni.Object) (bool, error)

AddDescriptor calls android.bluetooth.BluetoothGattCharacteristic.addDescriptor.

func (*GattCharacteristic) DescribeContents added in v0.0.4

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

DescribeContents calls android.bluetooth.BluetoothGattCharacteristic.describeContents.

func (*GattCharacteristic) GetDescriptor added in v0.0.4

func (m *GattCharacteristic) GetDescriptor(arg0 *jni.Object) (*jni.Object, error)

GetDescriptor calls android.bluetooth.BluetoothGattCharacteristic.getDescriptor.

func (*GattCharacteristic) GetDescriptors added in v0.0.4

func (m *GattCharacteristic) GetDescriptors() (*jni.Object, error)

GetDescriptors calls android.bluetooth.BluetoothGattCharacteristic.getDescriptors.

func (*GattCharacteristic) GetFloatValue added in v0.0.4

func (m *GattCharacteristic) GetFloatValue(arg0 int32, arg1 int32) (*jni.Object, error)

GetFloatValue calls android.bluetooth.BluetoothGattCharacteristic.getFloatValue.

func (*GattCharacteristic) GetInstanceId added in v0.0.4

func (m *GattCharacteristic) GetInstanceId() (int32, error)

GetInstanceId calls android.bluetooth.BluetoothGattCharacteristic.getInstanceId.

func (*GattCharacteristic) GetIntValue added in v0.0.4

func (m *GattCharacteristic) GetIntValue(arg0 int32, arg1 int32) (*jni.Object, error)

GetIntValue calls android.bluetooth.BluetoothGattCharacteristic.getIntValue.

func (*GattCharacteristic) GetPermissions added in v0.0.4

func (m *GattCharacteristic) GetPermissions() (int32, error)

GetPermissions calls android.bluetooth.BluetoothGattCharacteristic.getPermissions.

func (*GattCharacteristic) GetProperties added in v0.0.4

func (m *GattCharacteristic) GetProperties() (int32, error)

GetProperties calls android.bluetooth.BluetoothGattCharacteristic.getProperties.

func (*GattCharacteristic) GetService added in v0.0.4

func (m *GattCharacteristic) GetService() (*jni.Object, error)

GetService calls android.bluetooth.BluetoothGattCharacteristic.getService.

func (*GattCharacteristic) GetStringValue added in v0.0.4

func (m *GattCharacteristic) GetStringValue(arg0 int32) (string, error)

GetStringValue calls android.bluetooth.BluetoothGattCharacteristic.getStringValue.

func (*GattCharacteristic) GetUuid added in v0.0.4

func (m *GattCharacteristic) GetUuid() (*jni.Object, error)

GetUuid calls android.bluetooth.BluetoothGattCharacteristic.getUuid.

func (*GattCharacteristic) GetValue added in v0.0.4

func (m *GattCharacteristic) GetValue() (*jni.Object, error)

GetValue calls android.bluetooth.BluetoothGattCharacteristic.getValue.

func (*GattCharacteristic) GetWriteType added in v0.0.4

func (m *GattCharacteristic) GetWriteType() (int32, error)

GetWriteType calls android.bluetooth.BluetoothGattCharacteristic.getWriteType.

func (*GattCharacteristic) SetValue1 added in v0.0.4

func (m *GattCharacteristic) SetValue1(arg0 *jni.Object) (bool, error)

SetValue1 calls android.bluetooth.BluetoothGattCharacteristic.setValue.

func (*GattCharacteristic) SetValue1_3 added in v0.0.4

func (m *GattCharacteristic) SetValue1_3(arg0 string) (bool, error)

SetValue1_3 calls android.bluetooth.BluetoothGattCharacteristic.setValue.

func (*GattCharacteristic) SetValue3_1 added in v0.0.4

func (m *GattCharacteristic) SetValue3_1(
	arg0 int32,
	arg1 int32,
	arg2 int32,
) (bool, error)

SetValue3_1 calls android.bluetooth.BluetoothGattCharacteristic.setValue.

func (*GattCharacteristic) SetValue4_2 added in v0.0.4

func (m *GattCharacteristic) SetValue4_2(
	arg0 int32,
	arg1 int32,
	arg2 int32,
	arg3 int32,
) (bool, error)

SetValue4_2 calls android.bluetooth.BluetoothGattCharacteristic.setValue.

func (*GattCharacteristic) SetWriteType added in v0.0.4

func (m *GattCharacteristic) SetWriteType(arg0 int32) error

SetWriteType calls android.bluetooth.BluetoothGattCharacteristic.setWriteType.

func (*GattCharacteristic) WriteToParcel added in v0.0.4

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

WriteToParcel calls android.bluetooth.BluetoothGattCharacteristic.writeToParcel.

type GattDescriptor added in v0.0.4

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

GattDescriptor wraps android.bluetooth.BluetoothGattDescriptor.

func (*GattDescriptor) DescribeContents added in v0.0.4

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

DescribeContents calls android.bluetooth.BluetoothGattDescriptor.describeContents.

func (*GattDescriptor) GetCharacteristic added in v0.0.4

func (m *GattDescriptor) GetCharacteristic() (*jni.Object, error)

GetCharacteristic calls android.bluetooth.BluetoothGattDescriptor.getCharacteristic.

func (*GattDescriptor) GetPermissions added in v0.0.4

func (m *GattDescriptor) GetPermissions() (int32, error)

GetPermissions calls android.bluetooth.BluetoothGattDescriptor.getPermissions.

func (*GattDescriptor) GetUuid added in v0.0.4

func (m *GattDescriptor) GetUuid() (*jni.Object, error)

GetUuid calls android.bluetooth.BluetoothGattDescriptor.getUuid.

func (*GattDescriptor) GetValue added in v0.0.4

func (m *GattDescriptor) GetValue() (*jni.Object, error)

GetValue calls android.bluetooth.BluetoothGattDescriptor.getValue.

func (*GattDescriptor) SetValue added in v0.0.4

func (m *GattDescriptor) SetValue(arg0 *jni.Object) (bool, error)

SetValue calls android.bluetooth.BluetoothGattDescriptor.setValue.

func (*GattDescriptor) WriteToParcel added in v0.0.4

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

WriteToParcel calls android.bluetooth.BluetoothGattDescriptor.writeToParcel.

type GattServer added in v0.0.4

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

GattServer wraps android.bluetooth.BluetoothGattServer.

func (*GattServer) AddService added in v0.0.4

func (m *GattServer) AddService(arg0 *jni.Object) (bool, error)

AddService calls android.bluetooth.BluetoothGattServer.addService.

func (*GattServer) CancelConnection added in v0.0.4

func (m *GattServer) CancelConnection(arg0 *jni.Object) error

CancelConnection calls android.bluetooth.BluetoothGattServer.cancelConnection.

func (*GattServer) ClearServices added in v0.0.4

func (m *GattServer) ClearServices() error

ClearServices calls android.bluetooth.BluetoothGattServer.clearServices.

func (*GattServer) Close added in v0.0.4

func (m *GattServer) Close() error

Close calls android.bluetooth.BluetoothGattServer.close.

func (*GattServer) Connect added in v0.0.4

func (m *GattServer) Connect(arg0 *jni.Object, arg1 bool) (bool, error)

Connect calls android.bluetooth.BluetoothGattServer.connect.

func (*GattServer) GetConnectedDevices added in v0.0.4

func (m *GattServer) GetConnectedDevices() (*jni.Object, error)

GetConnectedDevices calls android.bluetooth.BluetoothGattServer.getConnectedDevices.

func (*GattServer) GetConnectionState added in v0.0.4

func (m *GattServer) GetConnectionState(arg0 *jni.Object) (int32, error)

GetConnectionState calls android.bluetooth.BluetoothGattServer.getConnectionState.

func (*GattServer) GetDevicesMatchingConnectionStates added in v0.0.4

func (m *GattServer) GetDevicesMatchingConnectionStates(arg0 *jni.Object) (*jni.Object, error)

GetDevicesMatchingConnectionStates calls android.bluetooth.BluetoothGattServer.getDevicesMatchingConnectionStates.

func (*GattServer) GetService added in v0.0.4

func (m *GattServer) GetService(arg0 *jni.Object) (*jni.Object, error)

GetService calls android.bluetooth.BluetoothGattServer.getService.

func (*GattServer) GetServices added in v0.0.4

func (m *GattServer) GetServices() (*jni.Object, error)

GetServices calls android.bluetooth.BluetoothGattServer.getServices.

func (*GattServer) NotifyCharacteristicChanged3 added in v0.0.4

func (m *GattServer) NotifyCharacteristicChanged3(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 bool,
) (bool, error)

NotifyCharacteristicChanged3 calls android.bluetooth.BluetoothGattServer.notifyCharacteristicChanged.

func (*GattServer) NotifyCharacteristicChanged4_1 added in v0.0.4

func (m *GattServer) NotifyCharacteristicChanged4_1(
	arg0 *jni.Object,
	arg1 *jni.Object,
	arg2 bool,
	arg3 *jni.Object,
) (int32, error)

NotifyCharacteristicChanged4_1 calls android.bluetooth.BluetoothGattServer.notifyCharacteristicChanged.

func (*GattServer) ReadPhy added in v0.0.4

func (m *GattServer) ReadPhy(arg0 *jni.Object) error

ReadPhy calls android.bluetooth.BluetoothGattServer.readPhy.

func (*GattServer) RemoveService added in v0.0.4

func (m *GattServer) RemoveService(arg0 *jni.Object) (bool, error)

RemoveService calls android.bluetooth.BluetoothGattServer.removeService.

func (*GattServer) SendResponse added in v0.0.4

func (m *GattServer) SendResponse(
	arg0 *jni.Object,
	arg1 int32,
	arg2 int32,
	arg3 int32,
	arg4 *jni.Object,
) (bool, error)

SendResponse calls android.bluetooth.BluetoothGattServer.sendResponse.

func (*GattServer) SetPreferredPhy added in v0.0.4

func (m *GattServer) SetPreferredPhy(
	arg0 *jni.Object,
	arg1 int32,
	arg2 int32,
	arg3 int32,
) error

SetPreferredPhy calls android.bluetooth.BluetoothGattServer.setPreferredPhy.

type GattService added in v0.0.4

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

GattService wraps android.bluetooth.BluetoothGattService.

func (*GattService) AddCharacteristic added in v0.0.4

func (m *GattService) AddCharacteristic(arg0 *jni.Object) (bool, error)

AddCharacteristic calls android.bluetooth.BluetoothGattService.addCharacteristic.

func (*GattService) AddService added in v0.0.4

func (m *GattService) AddService(arg0 *jni.Object) (bool, error)

AddService calls android.bluetooth.BluetoothGattService.addService.

func (*GattService) DescribeContents added in v0.0.4

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

DescribeContents calls android.bluetooth.BluetoothGattService.describeContents.

func (*GattService) GetCharacteristic added in v0.0.4

func (m *GattService) GetCharacteristic(arg0 *jni.Object) (*jni.Object, error)

GetCharacteristic calls android.bluetooth.BluetoothGattService.getCharacteristic.

func (*GattService) GetCharacteristics added in v0.0.4

func (m *GattService) GetCharacteristics() (*jni.Object, error)

GetCharacteristics calls android.bluetooth.BluetoothGattService.getCharacteristics.

func (*GattService) GetIncludedServices added in v0.0.4

func (m *GattService) GetIncludedServices() (*jni.Object, error)

GetIncludedServices calls android.bluetooth.BluetoothGattService.getIncludedServices.

func (*GattService) GetInstanceId added in v0.0.4

func (m *GattService) GetInstanceId() (int32, error)

GetInstanceId calls android.bluetooth.BluetoothGattService.getInstanceId.

func (*GattService) GetType added in v0.0.4

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

GetType calls android.bluetooth.BluetoothGattService.getType.

func (*GattService) GetUuid added in v0.0.4

func (m *GattService) GetUuid() (*jni.Object, error)

GetUuid calls android.bluetooth.BluetoothGattService.getUuid.

func (*GattService) WriteToParcel added in v0.0.4

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

WriteToParcel calls android.bluetooth.BluetoothGattService.writeToParcel.

type ServerSocket added in v0.0.4

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

ServerSocket wraps android.bluetooth.BluetoothServerSocket.

func (*ServerSocket) Accept0 added in v0.0.4

func (m *ServerSocket) Accept0() (*jni.Object, error)

Accept0 calls android.bluetooth.BluetoothServerSocket.accept.

func (*ServerSocket) Accept1_1 added in v0.0.4

func (m *ServerSocket) Accept1_1(arg0 int32) (*jni.Object, error)

Accept1_1 calls android.bluetooth.BluetoothServerSocket.accept.

func (*ServerSocket) Close added in v0.0.4

func (m *ServerSocket) Close() error

Close calls android.bluetooth.BluetoothServerSocket.close.

func (*ServerSocket) GetPsm added in v0.0.4

func (m *ServerSocket) GetPsm() (int32, error)

GetPsm calls android.bluetooth.BluetoothServerSocket.getPsm.

func (*ServerSocket) ToString added in v0.0.4

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

ToString calls android.bluetooth.BluetoothServerSocket.toString.

type Socket added in v0.0.4

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

Socket wraps android.bluetooth.BluetoothSocket.

func (*Socket) Close added in v0.0.4

func (m *Socket) Close() error

Close calls android.bluetooth.BluetoothSocket.close.

func (*Socket) Connect added in v0.0.4

func (m *Socket) Connect() error

Connect calls android.bluetooth.BluetoothSocket.connect.

func (*Socket) GetConnectionType added in v0.0.4

func (m *Socket) GetConnectionType() (int32, error)

GetConnectionType calls android.bluetooth.BluetoothSocket.getConnectionType.

func (*Socket) GetInputStream added in v0.0.4

func (m *Socket) GetInputStream() (*jni.Object, error)

GetInputStream calls android.bluetooth.BluetoothSocket.getInputStream.

func (*Socket) GetMaxReceivePacketSize added in v0.0.4

func (m *Socket) GetMaxReceivePacketSize() (int32, error)

GetMaxReceivePacketSize calls android.bluetooth.BluetoothSocket.getMaxReceivePacketSize.

func (*Socket) GetMaxTransmitPacketSize added in v0.0.4

func (m *Socket) GetMaxTransmitPacketSize() (int32, error)

GetMaxTransmitPacketSize calls android.bluetooth.BluetoothSocket.getMaxTransmitPacketSize.

func (*Socket) GetOutputStream added in v0.0.4

func (m *Socket) GetOutputStream() (*jni.Object, error)

GetOutputStream calls android.bluetooth.BluetoothSocket.getOutputStream.

func (*Socket) GetRemoteDevice added in v0.0.4

func (m *Socket) GetRemoteDevice() (*jni.Object, error)

GetRemoteDevice calls android.bluetooth.BluetoothSocket.getRemoteDevice.

func (*Socket) IsConnected added in v0.0.4

func (m *Socket) IsConnected() (bool, error)

IsConnected calls android.bluetooth.BluetoothSocket.isConnected.

func (*Socket) ToString added in v0.0.4

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

ToString calls android.bluetooth.BluetoothSocket.toString.

Directories

Path Synopsis
le
Package le provides Go bindings for android.bluetooth.le.
Package le provides Go bindings for android.bluetooth.le.

Jump to

Keyboard shortcuts

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