完成了测试代码

This commit is contained in:
董宏宇
2021-01-19 20:47:58 +08:00
parent 9c67cd918f
commit c8c7227c80
5 changed files with 24 additions and 23 deletions

View File

@@ -33,6 +33,7 @@ public class PassPortActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pass_port_actvity);
etAppKey = findViewById(R.id.etAppKey);
etDevicesId = findViewById(R.id.etDevicesId);
etSignSecret = findViewById(R.id.etSignSecret);
@@ -45,28 +46,21 @@ public class PassPortActivity extends AppCompatActivity {
clientConfig.setThirdLogin(true);
clientConfig.setThirdPartyAppKey("f8xx");
clientConfig.setThirdPartyDeviceId("f8xx");
clientConfig.setThirdPartySignSecret("f8xx");
clientConfig.setThirdPartyAppKey("6bbe7e0e1ecd8e2f8dc336e1678a2791");
mMoGoAiCloudClient = MoGoAiCloudClient.getInstance().init(this,clientConfig);
btnRefreshToken.setOnClickListener(new View.OnClickListener() {
btnRefreshToken.setOnClickListener(v -> mMoGoAiCloudClient.refreshToken(new IMoGoTokenCallback() {
@Override
public void onClick(View v) {
mMoGoAiCloudClient.refreshToken(new IMoGoTokenCallback() {
@Override
public void onTokenGot(String token, String sn) {
tvSn.setText(sn);
tvToken.setText(token);
}
@Override
public void onError(int code, String msg) {
}
});
public void onTokenGot(String token, String sn) {
tvSn.setText(sn);
tvToken.setText(token);
}
});
@Override
public void onError(int code, String msg) {
}
}));
}
}