[Change]
增加了分体机预览直播
This commit is contained in:
@@ -43,6 +43,26 @@ public class LivePlayActivity extends AppCompatActivity implements ITrafficCarLi
|
||||
private EditText etLookRoomId3;
|
||||
private String liveSn3;
|
||||
|
||||
private SurfaceView surfaceView4;
|
||||
private ToggleButton liveToggleBtn4;
|
||||
private EditText etLookRoomId4;
|
||||
private String liveSn4;
|
||||
|
||||
private SurfaceView surfaceView5;
|
||||
private ToggleButton liveToggleBtn5;
|
||||
private EditText etLookRoomId5;
|
||||
private String liveSn5;
|
||||
|
||||
private SurfaceView surfaceView6;
|
||||
private ToggleButton liveToggleBtn6;
|
||||
private EditText etLookRoomId6;
|
||||
private String liveSn6;
|
||||
|
||||
private SurfaceView surfaceView7;
|
||||
private ToggleButton liveToggleBtn7;
|
||||
private EditText etLookRoomId7;
|
||||
private String liveSn7;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -56,13 +76,11 @@ public class LivePlayActivity extends AppCompatActivity implements ITrafficCarLi
|
||||
surfaceView0 = findViewById(R.id.surfaceView0);
|
||||
etLookRoomId0 = findViewById(R.id.etLookRoomId0);
|
||||
liveToggleBtn0 = findViewById(R.id.liveToggleBtn0);
|
||||
|
||||
liveToggleBtn0.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
Toast.makeText(getApplicationContext(), buttonView.getText(), Toast.LENGTH_SHORT).show();
|
||||
if (isChecked) {
|
||||
liveSn0 = etLookRoomId0.getText().toString().trim();
|
||||
MoGoAiCloudTrafficLive.viewDesignativeVehicleLive(liveSn0, surfaceView0, this);
|
||||
// MoGoAiCloudTrafficLive.viewFrontVehicleLive(39.968253, 116.410829, 0, surfaceView, this);
|
||||
} else {
|
||||
MoGoAiCloudTrafficLive.stopCarLive(liveSn0);
|
||||
}
|
||||
@@ -71,13 +89,11 @@ public class LivePlayActivity extends AppCompatActivity implements ITrafficCarLi
|
||||
surfaceView1 = findViewById(R.id.surfaceView1);
|
||||
etLookRoomId1 = findViewById(R.id.etLookRoomId1);
|
||||
liveToggleBtn1 = findViewById(R.id.liveToggleBtn1);
|
||||
|
||||
liveToggleBtn1.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
Toast.makeText(getApplicationContext(), buttonView.getText(), Toast.LENGTH_SHORT).show();
|
||||
if (isChecked) {
|
||||
liveSn1 = etLookRoomId1.getText().toString().trim();
|
||||
MoGoAiCloudTrafficLive.viewDesignativeVehicleLive(liveSn1, surfaceView1, this);
|
||||
// MoGoAiCloudTrafficLive.viewFrontVehicleLive(39.968253, 116.410829, 0, surfaceView, this);
|
||||
} else {
|
||||
MoGoAiCloudTrafficLive.stopCarLive(liveSn1);
|
||||
}
|
||||
@@ -87,13 +103,11 @@ public class LivePlayActivity extends AppCompatActivity implements ITrafficCarLi
|
||||
surfaceView2 = findViewById(R.id.surfaceView2);
|
||||
etLookRoomId2 = findViewById(R.id.etLookRoomId2);
|
||||
liveToggleBtn2 = findViewById(R.id.liveToggleBtn2);
|
||||
|
||||
liveToggleBtn2.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
Toast.makeText(getApplicationContext(), buttonView.getText(), Toast.LENGTH_SHORT).show();
|
||||
if (isChecked) {
|
||||
liveSn2 = etLookRoomId2.getText().toString().trim();
|
||||
MoGoAiCloudTrafficLive.viewDesignativeVehicleLive(liveSn2, surfaceView2, this);
|
||||
// MoGoAiCloudTrafficLive.viewFrontVehicleLive(39.968253, 116.410829, 0, surfaceView, this);
|
||||
} else {
|
||||
MoGoAiCloudTrafficLive.stopCarLive(liveSn2);
|
||||
}
|
||||
@@ -103,18 +117,68 @@ public class LivePlayActivity extends AppCompatActivity implements ITrafficCarLi
|
||||
surfaceView3 = findViewById(R.id.surfaceView3);
|
||||
etLookRoomId3 = findViewById(R.id.etLookRoomId3);
|
||||
liveToggleBtn3 = findViewById(R.id.liveToggleBtn3);
|
||||
|
||||
liveToggleBtn3.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
Toast.makeText(getApplicationContext(), buttonView.getText(), Toast.LENGTH_SHORT).show();
|
||||
if (isChecked) {
|
||||
liveSn3 = etLookRoomId3.getText().toString().trim();
|
||||
MoGoAiCloudTrafficLive.viewDesignativeVehicleLive(liveSn3, surfaceView3, this);
|
||||
// MoGoAiCloudTrafficLive.viewFrontVehicleLive(39.968253, 116.410829, 0, surfaceView, this);
|
||||
} else {
|
||||
MoGoAiCloudTrafficLive.stopCarLive(liveSn3);
|
||||
}
|
||||
});
|
||||
|
||||
surfaceView4 = findViewById(R.id.surfaceView4);
|
||||
etLookRoomId4 = findViewById(R.id.etLookRoomId4);
|
||||
liveToggleBtn4 = findViewById(R.id.liveToggleBtn4);
|
||||
liveToggleBtn4.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
Toast.makeText(getApplicationContext(), buttonView.getText(), Toast.LENGTH_SHORT).show();
|
||||
if (isChecked) {
|
||||
liveSn4 = etLookRoomId4.getText().toString().trim();
|
||||
MoGoAiCloudTrafficLive.viewDesignativeVehicleLive(liveSn4, surfaceView4, this);
|
||||
} else {
|
||||
MoGoAiCloudTrafficLive.stopCarLive(liveSn4);
|
||||
}
|
||||
});
|
||||
|
||||
surfaceView5 = findViewById(R.id.surfaceView5);
|
||||
etLookRoomId5 = findViewById(R.id.etLookRoomId5);
|
||||
liveToggleBtn5 = findViewById(R.id.liveToggleBtn5);
|
||||
liveToggleBtn5.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
Toast.makeText(getApplicationContext(), buttonView.getText(), Toast.LENGTH_SHORT).show();
|
||||
if (isChecked) {
|
||||
liveSn5 = etLookRoomId5.getText().toString().trim();
|
||||
MoGoAiCloudTrafficLive.viewDesignativeVehicleLive(liveSn5, surfaceView5, this);
|
||||
} else {
|
||||
MoGoAiCloudTrafficLive.stopCarLive(liveSn5);
|
||||
}
|
||||
});
|
||||
|
||||
surfaceView6 = findViewById(R.id.surfaceView6);
|
||||
etLookRoomId6 = findViewById(R.id.etLookRoomId6);
|
||||
liveToggleBtn6 = findViewById(R.id.liveToggleBtn6);
|
||||
liveToggleBtn6.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
Toast.makeText(getApplicationContext(), buttonView.getText(), Toast.LENGTH_SHORT).show();
|
||||
if (isChecked) {
|
||||
liveSn6 = etLookRoomId6.getText().toString().trim();
|
||||
MoGoAiCloudTrafficLive.viewDesignativeVehicleLive(liveSn6, surfaceView6, this);
|
||||
} else {
|
||||
MoGoAiCloudTrafficLive.stopCarLive(liveSn6);
|
||||
}
|
||||
});
|
||||
|
||||
surfaceView7 = findViewById(R.id.surfaceView7);
|
||||
etLookRoomId7 = findViewById(R.id.etLookRoomId7);
|
||||
liveToggleBtn7 = findViewById(R.id.liveToggleBtn7);
|
||||
liveToggleBtn7.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
Toast.makeText(getApplicationContext(), buttonView.getText(), Toast.LENGTH_SHORT).show();
|
||||
if (isChecked) {
|
||||
liveSn7 = etLookRoomId7.getText().toString().trim();
|
||||
MoGoAiCloudTrafficLive.viewDesignativeVehicleLive(liveSn7, surfaceView7, this);
|
||||
} else {
|
||||
MoGoAiCloudTrafficLive.stopCarLive(liveSn7);
|
||||
}
|
||||
});
|
||||
|
||||
WifiStateManager.getInstance().registerWifiStateListener(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class MoGoApplication extends MultiDexApplication {
|
||||
// 设置AI云平台分配给三方应用的签名密钥,需要从AI云平台申请
|
||||
// 设置车机设备的唯一标识(这些表识必须是通过后台录入的设备)
|
||||
// TODO 这里使用的是测试的sn
|
||||
clientConfig.setThirdPartyDeviceId("123456789987654321");
|
||||
clientConfig.setThirdPartyDeviceId("1234567899876543214");
|
||||
// 设置应用服务AppId 长链、鉴权 //todo 需要卸载智慧驾驶、行车记录仪
|
||||
clientConfig.setServiceAppId("com.mogo.launcher");
|
||||
// 设置循环检测间隔时间
|
||||
|
||||
Reference in New Issue
Block a user