TuyaInc / tuyasmart_android_sdk

33 stars 24 forks source link

Issues with tuyasdk-home-2.6.4r95 #9

Closed mytuya closed 6 years ago

mytuya commented 6 years ago

I am using the tuyasdk-home-2.6.4r95 aar file. It has the following issues. I have imported the aar file.

I am trying to get activator token using

TuyaActivator.getInstance().getActivatorToken (FamilyManager.getInstance().getCurrentHomeId(),new ITuyaActivatorGetToken() { @Override public void onSuccess(String token) { //获取token成功 }

                @Override
                public void onFailure(String s, String s1) {
                    //获取token失败
                }
            });

The error I get is shown in the screen below. It cannot find TuyaActivator and FamilyManager.

screen shot 2018-08-30 at 12 47 43

After doing the following: TuyaCameraActivatorBuilder builder = new TuyaCameraActivatorBuilder(); builder.setSsid(etSSID.getText().toString()); builder.setToken(token); builder.setPassword(etKey.getText().toString()); builder.setTimeOut(100); builder.setListener(mListener);

I set the ITuyaCameraDevActivator mTuyaActivator = ITuyaCameraDevActivator.newCameraDevActivator(builder); mTuyaActivator.createQRCode(); mTuyaActivator.start();

It gives me the error newCameraDevActivator not found. Please see the screenshot below.

screen shot 2018-08-30 at 13 08 56
shubham3107 commented 6 years ago

mTuyaActivator = TuyaActivator.getInstance().newActivator(new ActivatorBuilder()

not working in new SDK