object WebCommunicator : NIMMSTAEventHandler, DeviceListUpdateDelegate
This object handles the communication with webpages that have an input element with the id "nimmsta-output-element" If the input field contains text this class processes the text and sends the required commands to the HS 50
NIMMSTA_INPUT_ID |
const val NIMMSTA_INPUT_ID: String |
NIMMSTA_OUTPUT_ID |
const val NIMMSTA_OUTPUT_ID: String |
NIMMSTA_VERSION_ID |
const val NIMMSTA_VERSION_ID: String |
TAG |
val TAG: String |
batteryLevelChanged |
fun batteryLevelChanged(: NIMMSTADevice, : Int): Unit |
checkNimmstaOutputField |
Checks if the nimmsta-output-element contains text. If it contains text, it is parsed to a List of WebActions that are performed afterwards fun checkNimmstaOutputField(serviceConnection: NIMMSTAServiceConnection?, node: AccessibilityNodeInfo? = NimmstaViewManager.tryToFindNIMMSTAOutputField()): Unit |
deviceUpdate |
Notifies webapps about device scan results, if device search is active fun deviceUpdate(: SearchScanResult, : DeviceListUpdateAction): Unit |
didClickButton |
Notifies webapps about button click events fun didClickButton(: NIMMSTADevice, : Button?, : ButtonClickEvent): Unit |
didConnectAndInit |
Notifies socket about new connected devices or reconnected devices fun didConnectAndInit(: NIMMSTADevice): Unit |
didDisconnect |
fun didDisconnect(: NIMMSTADevice, : Reason): Unit |
didStartCharging |
Notifies socket about a device that started charging fun didStartCharging(: NIMMSTADevice): Unit |
didStopCharging |
Notifies socket about a device that stopped charging fun didStopCharging(: NIMMSTADevice): Unit |
didTouch |
Notifies webapps about touch events fun didTouch(: NIMMSTADevice, : Double, : Double, : Int, : TouchEvent): Unit |
isActive |
fun isActive(): Boolean |
softwareUpdateProgress |
Notifies webapps about software update progress. fun softwareUpdateProgress(: NIMMSTADevice, : SoftwareUpdateProgress): Unit |