JacquardManager
public interface interface JacquardManager
Methods
getApplicationContext
public Context getApplicationContext()
Returns the application context
ReturnValue
Name | Description |
---|---|
Context
|
startScanning
public Signal<AdvertisedJacquardTag> startScanning()
Starts scanning for Jacquard Tags. When a tag is found it is emitted on the Main Thread.
ReturnValue
Name | Description |
---|---|
Signal<AdvertisedJacquardTag>
|
a Signal with found jacquard tags as a AdvertisedJacquardTag. |
connect
public Signal<ConnectionState> connect(String address)
Connects to the provided address.
Parameters
Name | Description |
---|---|
String address
|
bluetooth address to connect. |
ReturnValue
Name | Description |
---|---|
Signal<ConnectionState>
|
a Signal emitting the ConnectionState. |
connect
public Signal<ConnectionState> connect(Context activityContext, String address, Fn<IntentSender, Signal<Boolean>> senderHandler)
Connects to the provided address.
Parameters
Name | Description |
---|---|
Context activityContext
|
for pairing bluetooth device as companionDevice. |
String address
|
bluetooth address to connect. |
Fn<IntentSender, Signal<Boolean>> senderHandler
|
called when a device is found and send IntentSender object, so caller can register this bluetooth device as companionDevice. |
ReturnValue
Name | Description |
---|---|
Signal<ConnectionState>
|
a Signal emitting the ConnectionState. |
destroy
public void destroy()
Releases all allocation resources.
ReturnValue
Name | Description |
---|---|
void
|
forget
public void forget(String address)
Releases all observables held for the tag.
Parameters
Name | Description |
---|---|
String address
|
mac address of the tag. |
ReturnValue
Name | Description |
---|---|
void
|
getInstance
public static JacquardManager getInstance()
Returns a shared instance of JacquardManager.
ReturnValue
Name | Description |
---|---|
JacquardManager
|
init
public void init(SdkConfig config)
Initialized the sdk with provided SdkConfig object.
Parameters
Name | Description |
---|---|
SdkConfig config
|
a SdkConfigto initialize the sdk. |
ReturnValue
Name | Description |
---|---|
void
|
getConnectedTag
public Signal<ConnectedJacquardTag> getConnectedTag(String address)
Emits the ConnectedJacquardTag for the address, If Tag for the address is not initiated the connection process throughJacquardManagerthen method throwsIllegalStateException.
Parameters
Name | Description |
---|---|
String address
|
Unique address of the Tag. |
ReturnValue
Name | Description |
---|---|
Signal<ConnectedJacquardTag>
|
Signal |
getConnectionStateSignal
public Signal<ConnectionState> getConnectionStateSignal(String address)
Emits theConnectionStatefor the tag defined by address. If Tag for the address is not initiated the connection process throughJacquardManager, then returned signal will provide updates after the app initiate the process for the address.
Parameters
Name | Description |
---|---|
String address
|
Unique address of the Tag. |
ReturnValue
Name | Description |
---|---|
Signal<ConnectionState>
|
Signal |
getMemoryCache
public MemoryCache getMemoryCache()
ReturnValue
Name | Description |
---|---|
MemoryCache
|
getSdkConfig
public SdkConfig getSdkConfig()
ReturnValue
Name | Description |
---|---|
SdkConfig
|
getBadFirmwareVersions
public List<Revision> getBadFirmwareVersions()
ReturnValue
Name | Description |
---|---|
List<Revision>
|
setTargetUjtFirmwareVidPid
public void setTargetUjtFirmwareVidPid(VidPidMid targetUjtFirmwareVidPid)
Specify vendor id and product id if you are looking for ujt firmware specific to your app.
Parameters
Name | Description |
---|---|
VidPidMid targetUjtFirmwareVidPid
|
ReturnValue
Name | Description |
---|---|
void
|
Interface for scanning for and connecting to Jacquard Tags.
DO NOT forget to callJacquardManagerbefore calling any apis.