完成了测试代码
This commit is contained in:
@@ -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) {
|
||||
|
||||
}
|
||||
}));
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user