Class MeterlinkManager
java.lang.Object
com.flir.thermalsdk.androidsdk.meterlink.MeterlinkManager
Class managing FLIR Meterlink discovery.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Defines a discovery mode. -
Constructor Summary
ConstructorsConstructorDescriptionMeterlinkManager
(android.content.Context context, OnMeterlinkDiscoveryEventListener discoveryListener, FlirBluetoothAdapter flirBluetoothAdapter) In order to use the MeterlinkManager you need to define the following permissions in the AndroidManifest.xml file:
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> -
Method Summary
Modifier and TypeMethodDescriptionGets a discovery mode set for the MeterlinkManager.boolean
Checks whether Bluetooth is enabled.boolean
Checks whether discovery is in progress.void
Allows to specify discovery mode.void
Starts scanning/discovery for FLIR Meterlink devices.void
Stops scanning/discovery for FLIR Meterlink devices.
-
Constructor Details
-
MeterlinkManager
public MeterlinkManager(android.content.Context context, OnMeterlinkDiscoveryEventListener discoveryListener, FlirBluetoothAdapter flirBluetoothAdapter) In order to use the MeterlinkManager you need to define the following permissions in the AndroidManifest.xml file:
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>- Parameters:
discoveryListener
- a OnMeterlinkDiscoveryEventListener used to notify about discovery eventsflirBluetoothAdapter
- a initialized bluetooth adapter
-
-
Method Details
-
startDiscovery
public void startDiscovery()Starts scanning/discovery for FLIR Meterlink devices. Important: this method should be called on a background thread. -
stopDiscovery
public void stopDiscovery()Stops scanning/discovery for FLIR Meterlink devices. -
setDiscoveryMode
Allows to specify discovery mode. Available modes are: AUTO - automatically discovers BLE and Classic BT devices BLE - discovers BLE devices only CLASSIC - discovers Classic BT devices only- Parameters:
mode
- discovery mode
-
getDiscoveryMode
Gets a discovery mode set for the MeterlinkManager.- Returns:
- Returns a discovery mode set for the MeterlinkManager.
-
isDiscovering
public boolean isDiscovering()Checks whether discovery is in progress.- Returns:
- Returns true if discovery is in progress, otherwise false.
-
isBluetoothEnabled
public boolean isBluetoothEnabled()Checks whether Bluetooth is enabled.- Returns:
- Returns true if Bluetooth is enabled, otherwise false.
-