-
public final class NIMMSTAManagerHolds the connected devices of the NIMMSTA App and some settings
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classNIMMSTAManager.Companion
-
Field Summary
Fields Modifier and Type Field Description private final List<NIMMSTADevice>devicesprivate ManagerSettingssettingsprivate BooleanallowMultiDeviceprivate BooleaninterpretButtonAsMotionTrigger
-
Constructor Summary
Constructors Constructor Description NIMMSTAManager(NIMMSTAService service)
-
Method Summary
Modifier and Type Method Description final List<NIMMSTADevice>getDevices()final ManagerSettingsgetSettings()final UnitsetSettings(ManagerSettings settings)final BooleangetAllowMultiDevice()final UnitsetAllowMultiDevice(Boolean allowMultiDevice)final BooleangetInterpretButtonAsMotionTrigger()final UnitsetInterpretButtonAsMotionTrigger(Boolean interpretButtonAsMotionTrigger)final Task<Unit>getInitialManagerInfos()Initial request after creation to get devices and settings final NIMMSTADevicegetDeviceWithAddress(String address)Tries to return the device with the given address null if not found final UnitaddOrUpdateDevice(NIMMSTADevice device)Adds or updates NIMMSTADevice in devices final Task<Unit>displayConnectActivity()Displays the connect activity to scan with a scanner final Task<Unit>searchForNimmstaDevices()Starts the search for scanners. final Task<Unit>cancelSearch()Cancels the search for scanners final Task<Unit>searchForLightTags()Starts the search for light tagsImplement the NIMMSTAManagerEventHandler to get notified about found light tags final Task<Unit>stopSearchForLightTags()Cancels the search for light tags final Task<NIMMSTADevice>connectToAddress(String address, Integer scanTimeout)Tries to connect to a device with the given address Can be cancelled with cancelConnect final Task<NIMMSTADevice>connectToConnectionCode(String connectionCode, Integer scanTimeout)Tries to connect to a device with the given connection code Can be cancelled with cancelConnect final Task<Unit>cancelConnect(String addressOrCode)Cancels a specific ongoing connect attempt with the given connectionCode or address final Task<Unit>cancelAllConnect()Cancels all ongoing connect attempts final Task<GetConnectionCodeResponse>getConnectionCode()Gets a new connectionCode that can be used to create a QR Code that is able to be scanned to connect a new device final Task<Boolean>canChangeCompatibilityMode()Gets info if compatibility mode can be changed. final Task<Unit>changeBluetoothCompatibilityMode(Boolean active)Gets and sets compatibility mode. final Task<Unit>setAppInBackgroundScreen(String xmlString, Map<String, String> parameters)final Task<Unit>setAppInBackgroundScreen(NIMMSTALayout nimmstaLayout)final Task<Unit>setDesiredLightTags(List<String> lightTags)final Task<Unit>setDesiredLightTags(List<String> lightTags, LightTagIlluminationConfig config)final Task<Unit>setDesiredLightTags(List<String> lightTags, LTColor color, Integer intensity, LTBlinkingPattern pattern)final Task<Unit>attachLightTag(String macAddress, String location)final Task<Unit>detachLightTag(String macAddress)-
-
Constructor Detail
-
NIMMSTAManager
NIMMSTAManager(NIMMSTAService service)
-
-
Method Detail
-
getDevices
final List<NIMMSTADevice> getDevices()
-
getSettings
final ManagerSettings getSettings()
-
setSettings
final Unit setSettings(ManagerSettings settings)
-
getAllowMultiDevice
final Boolean getAllowMultiDevice()
-
setAllowMultiDevice
final Unit setAllowMultiDevice(Boolean allowMultiDevice)
-
getInterpretButtonAsMotionTrigger
final Boolean getInterpretButtonAsMotionTrigger()
-
setInterpretButtonAsMotionTrigger
final Unit setInterpretButtonAsMotionTrigger(Boolean interpretButtonAsMotionTrigger)
-
getInitialManagerInfos
final Task<Unit> getInitialManagerInfos()
Initial request after creation to get devices and settings
-
getDeviceWithAddress
final NIMMSTADevice getDeviceWithAddress(String address)
Tries to return the device with the given address null if not found
-
addOrUpdateDevice
final Unit addOrUpdateDevice(NIMMSTADevice device)
Adds or updates NIMMSTADevice in devices
-
displayConnectActivity
final Task<Unit> displayConnectActivity()
Displays the connect activity to scan with a scanner
-
searchForNimmstaDevices
final Task<Unit> searchForNimmstaDevices()
Starts the search for scanners.
Implement the NIMMSTAManagerEventHandler to get notified about found scanners
-
cancelSearch
final Task<Unit> cancelSearch()
Cancels the search for scanners
-
searchForLightTags
final Task<Unit> searchForLightTags()
Starts the search for light tags
Implement the NIMMSTAManagerEventHandler to get notified about found light tags
-
stopSearchForLightTags
final Task<Unit> stopSearchForLightTags()
Cancels the search for light tags
-
connectToAddress
final Task<NIMMSTADevice> connectToAddress(String address, Integer scanTimeout)
Tries to connect to a device with the given address Can be cancelled with cancelConnect
- Parameters:
address- Address to connect toscanTimeout- timeout in ms until scanning is stopped
-
connectToConnectionCode
final Task<NIMMSTADevice> connectToConnectionCode(String connectionCode, Integer scanTimeout)
Tries to connect to a device with the given connection code Can be cancelled with cancelConnect
- Parameters:
connectionCode- Connection code to connect toscanTimeout- timeout in ms until scanning is stopped
-
cancelConnect
final Task<Unit> cancelConnect(String addressOrCode)
Cancels a specific ongoing connect attempt with the given connectionCode or address
- Parameters:
addressOrCode- The address or connectionCode used to start the attempt
-
cancelAllConnect
final Task<Unit> cancelAllConnect()
Cancels all ongoing connect attempts
-
getConnectionCode
final Task<GetConnectionCodeResponse> getConnectionCode()
Gets a new connectionCode that can be used to create a QR Code that is able to be scanned to connect a new device
-
canChangeCompatibilityMode
final Task<Boolean> canChangeCompatibilityMode()
Gets info if compatibility mode can be changed.
-
changeBluetoothCompatibilityMode
final Task<Unit> changeBluetoothCompatibilityMode(Boolean active)
Gets and sets compatibility mode. Please check canChangeCompatibilityMode if can be changed.
- Parameters:
active- If compatibility mode should be turned on or off
-
setAppInBackgroundScreen
final Task<Unit> setAppInBackgroundScreen(String xmlString, Map<String, String> parameters)
-
setAppInBackgroundScreen
final Task<Unit> setAppInBackgroundScreen(NIMMSTALayout nimmstaLayout)
-
setDesiredLightTags
final Task<Unit> setDesiredLightTags(List<String> lightTags)
-
setDesiredLightTags
final Task<Unit> setDesiredLightTags(List<String> lightTags, LightTagIlluminationConfig config)
-
setDesiredLightTags
final Task<Unit> setDesiredLightTags(List<String> lightTags, LTColor color, Integer intensity, LTBlinkingPattern pattern)
-
attachLightTag
final Task<Unit> attachLightTag(String macAddress, String location)
-
detachLightTag
final Task<Unit> detachLightTag(String macAddress)
-
-
-
-