Versions in this module Expand all Collapse all v0 v0.0.9 Apr 6, 2026 v0.0.8 Apr 3, 2026 v0.0.7 Mar 28, 2026 v0.0.6 Mar 22, 2026 v0.0.5 Mar 22, 2026 Changes in this version + const DescriptorIContextHub + const DescriptorIContextHubCallback + const IContextHubCallbackContexthubNanTransactionTimeoutMs + const IContextHubExContextHubUnspecified + const MethodIContextHubCallbackGetName + const MethodIContextHubCallbackGetUuid + const MethodIContextHubCallbackHandleContextHubAsyncEvent + const MethodIContextHubCallbackHandleContextHubMessage + const MethodIContextHubCallbackHandleMessageDeliveryStatus + const MethodIContextHubCallbackHandleNanSessionRequest + const MethodIContextHubCallbackHandleNanoappInfo + const MethodIContextHubCallbackHandleTransactionResult + const MethodIContextHubDisableNanoapp + const MethodIContextHubEnableNanoapp + const MethodIContextHubGetContextHubs + const MethodIContextHubGetPreloadedNanoappIds + const MethodIContextHubLoadNanoapp + const MethodIContextHubOnHostEndpointConnected + const MethodIContextHubOnHostEndpointDisconnected + const MethodIContextHubOnNanSessionStateChanged + const MethodIContextHubOnSettingChanged + const MethodIContextHubQueryNanoapps + const MethodIContextHubRegisterCallback + const MethodIContextHubSendMessageDeliveryStatusToHub + const MethodIContextHubSendMessageToHub + const MethodIContextHubSetTestMode + const MethodIContextHubUnloadNanoapp + const NanoappBinaryFlagEncrypted + const NanoappBinaryFlagSigned + const NanoappBinaryFlagTcmCapable + const TransactionIContextHubCallbackGetName + const TransactionIContextHubCallbackGetUuid + const TransactionIContextHubCallbackHandleContextHubAsyncEvent + const TransactionIContextHubCallbackHandleContextHubMessage + const TransactionIContextHubCallbackHandleMessageDeliveryStatus + const TransactionIContextHubCallbackHandleNanSessionRequest + const TransactionIContextHubCallbackHandleNanoappInfo + const TransactionIContextHubCallbackHandleTransactionResult + const TransactionIContextHubDisableNanoapp + const TransactionIContextHubEnableNanoapp + const TransactionIContextHubGetContextHubs + const TransactionIContextHubGetPreloadedNanoappIds + const TransactionIContextHubLoadNanoapp + const TransactionIContextHubOnHostEndpointConnected + const TransactionIContextHubOnHostEndpointDisconnected + const TransactionIContextHubOnNanSessionStateChanged + const TransactionIContextHubOnSettingChanged + const TransactionIContextHubQueryNanoapps + const TransactionIContextHubRegisterCallback + const TransactionIContextHubSendMessageDeliveryStatusToHub + const TransactionIContextHubSendMessageToHub + const TransactionIContextHubSetTestMode + const TransactionIContextHubUnloadNanoapp + type AsyncEventType int32 + const AsyncEventTypeRESTARTED + type ContextHubCallbackProxy struct + Remote binder.IBinder + func NewContextHubCallbackProxy(remote binder.IBinder) *ContextHubCallbackProxy + func (p *ContextHubCallbackProxy) AsBinder() binder.IBinder + func (p *ContextHubCallbackProxy) GetName(ctx context.Context) (string, error) + func (p *ContextHubCallbackProxy) GetUuid(ctx context.Context) ([]byte, error) + func (p *ContextHubCallbackProxy) HandleContextHubAsyncEvent(ctx context.Context, evt AsyncEventType) error + func (p *ContextHubCallbackProxy) HandleContextHubMessage(ctx context.Context, msg ContextHubMessage, msgContentPerms []string) error + func (p *ContextHubCallbackProxy) HandleMessageDeliveryStatus(ctx context.Context, hostEndpointId uint16, ...) error + func (p *ContextHubCallbackProxy) HandleNanSessionRequest(ctx context.Context, request NanSessionRequest) error + func (p *ContextHubCallbackProxy) HandleNanoappInfo(ctx context.Context, appInfo []NanoappInfo) error + func (p *ContextHubCallbackProxy) HandleTransactionResult(ctx context.Context, transactionId int32, success bool) error + type ContextHubCallbackStub struct + Impl IContextHubCallback + Transport binder.VersionAwareTransport + func (s *ContextHubCallbackStub) Descriptor() string + func (s *ContextHubCallbackStub) OnTransaction(ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel) (*parcel.Parcel, error) + type ContextHubInfo struct + ChreApiMajorVersion byte + ChreApiMinorVersion byte + ChrePatchVersion uint16 + ChrePlatformId int64 + Id int32 + MaxSupportedMessageLengthBytes int32 + Name string + PeakMips float32 + SupportedPermissions []string + SupportsReliableMessages bool + Toolchain string + Vendor string + func (s *ContextHubInfo) MarshalParcel(p *parcel.Parcel) error + func (s *ContextHubInfo) UnmarshalParcel(p *parcel.Parcel) error + type ContextHubMessage struct + HostEndPoint uint16 + IsReliable bool + MessageBody []byte + MessageSequenceNumber int32 + MessageType int32 + NanoappId int64 + Permissions []string + func (s *ContextHubMessage) MarshalParcel(p *parcel.Parcel) error + func (s *ContextHubMessage) UnmarshalParcel(p *parcel.Parcel) error + type ContextHubProxy struct + Remote binder.IBinder + func NewContextHubProxy(remote binder.IBinder) *ContextHubProxy + func (p *ContextHubProxy) AsBinder() binder.IBinder + func (p *ContextHubProxy) DisableNanoapp(ctx context.Context, contextHubId int32, appId int64, transactionId int32) error + func (p *ContextHubProxy) EnableNanoapp(ctx context.Context, contextHubId int32, appId int64, transactionId int32) error + func (p *ContextHubProxy) GetContextHubs(ctx context.Context) ([]ContextHubInfo, error) + func (p *ContextHubProxy) GetPreloadedNanoappIds(ctx context.Context, contextHubId int32) ([]int64, error) + func (p *ContextHubProxy) LoadNanoapp(ctx context.Context, contextHubId int32, appBinary NanoappBinary, ...) error + func (p *ContextHubProxy) OnHostEndpointConnected(ctx context.Context, hostEndpointInfo HostEndpointInfo) error + func (p *ContextHubProxy) OnHostEndpointDisconnected(ctx context.Context, hostEndpointId uint16) error + func (p *ContextHubProxy) OnNanSessionStateChanged(ctx context.Context, update NanSessionStateUpdate) error + func (p *ContextHubProxy) OnSettingChanged(ctx context.Context, setting Setting, enabled bool) error + func (p *ContextHubProxy) QueryNanoapps(ctx context.Context, contextHubId int32) error + func (p *ContextHubProxy) RegisterCallback(ctx context.Context, contextHubId int32, cb IContextHubCallback) error + func (p *ContextHubProxy) SendMessageDeliveryStatusToHub(ctx context.Context, contextHubId int32, ...) error + func (p *ContextHubProxy) SendMessageToHub(ctx context.Context, contextHubId int32, message ContextHubMessage) error + func (p *ContextHubProxy) SetTestMode(ctx context.Context, enable bool) error + func (p *ContextHubProxy) UnloadNanoapp(ctx context.Context, contextHubId int32, appId int64, transactionId int32) error + type ContextHubStub struct + Impl IContextHub + Transport binder.VersionAwareTransport + func (s *ContextHubStub) Descriptor() string + func (s *ContextHubStub) OnTransaction(ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel) (*parcel.Parcel, error) + type ErrorCode byte + const ErrorCodeDestinationNotFound + const ErrorCodeOK + const ErrorCodePermanentError + const ErrorCodePermissionDenied + const ErrorCodeTransientError + type HostEndpointInfo struct + AttributionTag string + HostEndpointId uint16 + PackageName string + Type HostEndpointInfoType + func (s *HostEndpointInfo) MarshalParcel(p *parcel.Parcel) error + func (s *HostEndpointInfo) UnmarshalParcel(p *parcel.Parcel) error + type HostEndpointInfoType int32 + const HostEndpointInfoTypeAPP + const HostEndpointInfoTypeFRAMEWORK + const HostEndpointInfoTypeNATIVE + type IContextHub interface + AsBinder func() binder.IBinder + DisableNanoapp func(ctx context.Context, contextHubId int32, appId int64, transactionId int32) error + EnableNanoapp func(ctx context.Context, contextHubId int32, appId int64, transactionId int32) error + GetContextHubs func(ctx context.Context) ([]ContextHubInfo, error) + GetPreloadedNanoappIds func(ctx context.Context, contextHubId int32) ([]int64, error) + LoadNanoapp func(ctx context.Context, contextHubId int32, appBinary NanoappBinary, ...) error + OnHostEndpointConnected func(ctx context.Context, hostEndpointInfo HostEndpointInfo) error + OnHostEndpointDisconnected func(ctx context.Context, hostEndpointId uint16) error + OnNanSessionStateChanged func(ctx context.Context, update NanSessionStateUpdate) error + OnSettingChanged func(ctx context.Context, setting Setting, enabled bool) error + QueryNanoapps func(ctx context.Context, contextHubId int32) error + RegisterCallback func(ctx context.Context, contextHubId int32, cb IContextHubCallback) error + SendMessageDeliveryStatusToHub func(ctx context.Context, contextHubId int32, ...) error + SendMessageToHub func(ctx context.Context, contextHubId int32, message ContextHubMessage) error + SetTestMode func(ctx context.Context, enable bool) error + UnloadNanoapp func(ctx context.Context, contextHubId int32, appId int64, transactionId int32) error + func NewContextHubStub(impl IContextHubServer) IContextHub + type IContextHubCallback interface + AsBinder func() binder.IBinder + GetName func(ctx context.Context) (string, error) + GetUuid func(ctx context.Context) ([]byte, error) + HandleContextHubAsyncEvent func(ctx context.Context, evt AsyncEventType) error + HandleContextHubMessage func(ctx context.Context, msg ContextHubMessage, msgContentPerms []string) error + HandleMessageDeliveryStatus func(ctx context.Context, hostEndpointId uint16, ...) error + HandleNanSessionRequest func(ctx context.Context, request NanSessionRequest) error + HandleNanoappInfo func(ctx context.Context, appInfo []NanoappInfo) error + HandleTransactionResult func(ctx context.Context, transactionId int32, success bool) error + func NewContextHubCallbackStub(impl IContextHubCallbackServer) IContextHubCallback + type IContextHubCallbackServer interface + GetName func(ctx context.Context) (string, error) + GetUuid func(ctx context.Context) ([]byte, error) + HandleContextHubAsyncEvent func(ctx context.Context, evt AsyncEventType) error + HandleContextHubMessage func(ctx context.Context, msg ContextHubMessage, msgContentPerms []string) error + HandleMessageDeliveryStatus func(ctx context.Context, hostEndpointId uint16, ...) error + HandleNanSessionRequest func(ctx context.Context, request NanSessionRequest) error + HandleNanoappInfo func(ctx context.Context, appInfo []NanoappInfo) error + HandleTransactionResult func(ctx context.Context, transactionId int32, success bool) error + type IContextHubServer interface + DisableNanoapp func(ctx context.Context, contextHubId int32, appId int64, transactionId int32) error + EnableNanoapp func(ctx context.Context, contextHubId int32, appId int64, transactionId int32) error + GetContextHubs func(ctx context.Context) ([]ContextHubInfo, error) + GetPreloadedNanoappIds func(ctx context.Context, contextHubId int32) ([]int64, error) + LoadNanoapp func(ctx context.Context, contextHubId int32, appBinary NanoappBinary, ...) error + OnHostEndpointConnected func(ctx context.Context, hostEndpointInfo HostEndpointInfo) error + OnHostEndpointDisconnected func(ctx context.Context, hostEndpointId uint16) error + OnNanSessionStateChanged func(ctx context.Context, update NanSessionStateUpdate) error + OnSettingChanged func(ctx context.Context, setting Setting, enabled bool) error + QueryNanoapps func(ctx context.Context, contextHubId int32) error + RegisterCallback func(ctx context.Context, contextHubId int32, cb IContextHubCallback) error + SendMessageDeliveryStatusToHub func(ctx context.Context, contextHubId int32, ...) error + SendMessageToHub func(ctx context.Context, contextHubId int32, message ContextHubMessage) error + SetTestMode func(ctx context.Context, enable bool) error + UnloadNanoapp func(ctx context.Context, contextHubId int32, appId int64, transactionId int32) error + type MessageDeliveryStatus struct + ErrorCode ErrorCode + MessageSequenceNumber int32 + func (s *MessageDeliveryStatus) MarshalParcel(p *parcel.Parcel) error + func (s *MessageDeliveryStatus) UnmarshalParcel(p *parcel.Parcel) error + type NanSessionRequest struct + Enable bool + func (s *NanSessionRequest) MarshalParcel(p *parcel.Parcel) error + func (s *NanSessionRequest) UnmarshalParcel(p *parcel.Parcel) error + type NanSessionStateUpdate struct + State bool + func (s *NanSessionStateUpdate) MarshalParcel(p *parcel.Parcel) error + func (s *NanSessionStateUpdate) UnmarshalParcel(p *parcel.Parcel) error + type NanoappBinary struct + CustomBinary []byte + Flags int32 + NanoappId int64 + NanoappVersion int32 + TargetChreApiMajorVersion byte + TargetChreApiMinorVersion byte + func (s *NanoappBinary) MarshalParcel(p *parcel.Parcel) error + func (s *NanoappBinary) UnmarshalParcel(p *parcel.Parcel) error + type NanoappInfo struct + Enabled bool + NanoappId int64 + NanoappVersion int32 + Permissions []string + RpcServices []NanoappRpcService + func (s *NanoappInfo) MarshalParcel(p *parcel.Parcel) error + func (s *NanoappInfo) UnmarshalParcel(p *parcel.Parcel) error + type NanoappRpcService struct + Id int64 + Version int32 + func (s *NanoappRpcService) MarshalParcel(p *parcel.Parcel) error + func (s *NanoappRpcService) UnmarshalParcel(p *parcel.Parcel) error + type Setting byte + const SettingAirplaneMode + const SettingBtMain + const SettingBtScanning + const SettingLOCATION + const SettingMICROPHONE + const SettingWifiMain + const SettingWifiScanning