Interface SDKManagerCallback


  • public interface SDKManagerCallback
    Callback interface for HSSDK Manager events
    Version:
    1.0.0
    Author:
    wmy
    • Method Detail

      • onRegister

        void onRegister()
        Called back when registration of the SDK is completed in the app
      • onServerConnected

        void onServerConnected​(boolean reconnect,
                               java.lang.String serverURL)
        Called back on a successful connection to the MQTT server
        Parameters:
        reconnect - Whether to reconnect automatically when disconnected
        serverURL - MQTT server URL
      • onServerDisconnected

        void onServerDisconnected​(java.lang.Throwable cause)
        Called back when disconnected to the MQTT server
        Parameters:
        cause - Reasons for disconnection
      • onProductConnected

        void onProductConnected​(java.lang.String deviceName)
        Called back on successful device connection
        Parameters:
        deviceName - Device name of the successfully connected device
      • onProductDisconnected

        void onProductDisconnected()
        Called back when the device is disconnected
      • onComponentChanged

        void onComponentChanged​(BaseComponent component,
                                ConnStatus connStatus)
        Called back when the state of the component connection has changed
        Parameters:
        component - Component Type
        connStatus - Connection status of components