43 lines
1.2 KiB
Java
43 lines
1.2 KiB
Java
package com.mogo.cloud;
|
|
|
|
import android.os.Bundle;
|
|
import android.widget.Button;
|
|
import android.widget.EditText;
|
|
import android.widget.TextView;
|
|
|
|
import androidx.appcompat.app.AppCompatActivity;
|
|
|
|
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
|
|
|
/**
|
|
* 鉴权sdk测试页面
|
|
*/
|
|
public class PassPortActivity extends AppCompatActivity {
|
|
|
|
|
|
private EditText etAppKey;
|
|
private EditText etDevicesId;
|
|
private EditText etSignSecret;
|
|
private Button btnRefreshToken;
|
|
private TextView tvSn;
|
|
private TextView tvToken;
|
|
|
|
@Override
|
|
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);
|
|
btnRefreshToken = findViewById(R.id.btnRefreshToken);
|
|
tvSn = findViewById(R.id.tvSn);
|
|
tvToken = findViewById(R.id.tvToken);
|
|
|
|
btnRefreshToken.setOnClickListener(v -> {
|
|
tvSn.setText(MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getSn());
|
|
tvToken.setText(MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getToken());
|
|
});
|
|
|
|
}
|
|
} |