增加了demo
This commit is contained in:
@@ -20,12 +20,16 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
private TextView tvSn;
|
||||
private TextView tvToken;
|
||||
private TextView tvAppKey;
|
||||
private TextView tvDevicesId;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
tvAppKey = findViewById(R.id.tvAppKey);
|
||||
tvDevicesId = findViewById(R.id.tvDevicesId);
|
||||
tvSn = findViewById(R.id.tvSn);
|
||||
tvToken = findViewById(R.id.tvToken);
|
||||
|
||||
@@ -63,6 +67,9 @@ public class MainActivity extends AppCompatActivity {
|
||||
* 初始化令牌信息
|
||||
*/
|
||||
private void initPassportInfo() {
|
||||
tvAppKey.setText("AppKey:" + MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getThirdPartyDeviceId());
|
||||
tvDevicesId.setText("DevicesId:" + MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getThirdPartyDeviceId());
|
||||
|
||||
String sn = MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getSn();
|
||||
String token = MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getToken();
|
||||
|
||||
|
||||
@@ -10,11 +10,27 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAppKey"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:text="AppKey:"
|
||||
android:textSize="20dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDevicesId"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:text="DevicesId:"
|
||||
android:textSize="20dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_margin="5dp"
|
||||
android:text="SN:"
|
||||
android:textSize="20dp" />
|
||||
|
||||
@@ -22,7 +38,7 @@
|
||||
android:id="@+id/tvToken"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_margin="5dp"
|
||||
android:text="Token:"
|
||||
android:textSize="20dp" />
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<resources>
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
|
||||
@@ -52,7 +52,6 @@ public class MoGoAiCloudClient {
|
||||
*
|
||||
* @param context 上下文
|
||||
* @param aiCloudClientConfig SDK配置信息
|
||||
* @param tokenCallback 获取令牌回调,使用端可根据回调的方法判断是否获取令牌成功,可为空
|
||||
*/
|
||||
public MoGoAiCloudClient init(Context context,
|
||||
MoGoAiCloudClientConfig aiCloudClientConfig
|
||||
|
||||
Reference in New Issue
Block a user