Exemplo n.º 1
0
        public void ConnectToGateway(BTDeviceInfo router, ConnectGatewayCallBack callback)
        {
            callback.IsNotNull(nameof(callback));
            router.IsNotNull(nameof(router));

            __gatewayClientObj.Call("connectGateway", router.Mac, callback);
        }
Exemplo n.º 2
0
        public void InitGateway(
            BTDeviceInfo router,
            WifiInfo wifiInfo,
            UserInfo user,
            InitGatewayCallback callback
            )
        {
            router.IsNotNull(nameof(router));
            wifiInfo.IsNotNull(nameof(wifiInfo));
            user.IsNotNull(nameof(user));
            callback.IsNotNull(nameof(callback));

            var gatewayConfig = new AndroidJavaObject("com.ttlock.bl.sdk.gateway.model.ConfigureGatewayInfo");

            gatewayConfig.Set("uid", user.Uid);
            gatewayConfig.Set("userPwd", user.MD5Password);
            gatewayConfig.Set("ssid", wifiInfo.WifiName);
            gatewayConfig.Set("wifiPwd", wifiInfo.WifiPassword);
            gatewayConfig.Set("plugName", router.Mac);

            __gatewayClientObj.Call("initGateway", gatewayConfig, callback);
        }