Android_SDK_Demo
Android_SDK_Demo copied to clipboard
Wireless gateway integration issue using new SDK
Hello!
I've used the SDK "ttlock-sdk-2.0.aar" and "ttlock-gateway-sdk-2.0.aar" in my project for the smart locks. Now I want to integrate the wireless gateway into my project. So I tried using GatewayAPI and followed the instruction given in TTLock documentation. It couldn't work for me and I don't know where I'm going wrong. So I tried the new SDK "com.tongtonglock:ttlock:3.0.6" for gateway integration. Using that I could scan the gateway, connect the gateway and scan wifi networks for gateway; but I couldn't init the gateway. I used the credentials of my TTLock account for this. I used the method as below -
configureGatewayInfo.uid = MY_INTEGER_USER_ID;
configureGatewayInfo.userPwd = MY_PASSWORD;
configureGatewayInfo.ssid = binding.wifiName.getText().toString().trim();
configureGatewayInfo.plugName = binding.gatewayName.getText().toString().trim();
configureGatewayInfo.wifiPwd = binding.wifiPwd.getText().toString().trim();
GatewayClient.getDefault().initGateway(configureGatewayInfo, new InitGatewayCallback() {
@Override
public void onInitGatewaySuccess(DeviceInfo deviceInfo) {
makeToast("gateway init success");
}
@Override
public void onFail(GatewayError error) {
makeToast(error.getDescription());
}
});
It is not showing the message in onFail, not in onInitGatewaySuccess and not even showing some error or exception and after some time, the gateway times out.
Can you please tell me where I'm going wrong or help to solve the issue? Also please let me know if there is any way to integrate "ttlock-sdk-2.0.aar" along with "com.tongtonglock:ttlock:3.0.6".
Thanks in advance!
Hello @AAkanksha26 , Did you get any solution?
I am also facing a similar issue. For me, it's not even scanning.
@ttlock , @lxk123 Please help