增加了对查看前方车辆的调用测试
This commit is contained in:
@@ -4,12 +4,14 @@ import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.text.TextUtils;
|
||||
import android.view.SurfaceView;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mogo.cloud.network.NetworkActivity;
|
||||
import com.mogo.cloud.passport.IMoGoTokenCallback;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.trafficlive.api.ITrafficCarLiveCallBack;
|
||||
import com.mogo.cloud.trafficlive.api.ITrafficIntersectionLiveCallBack;
|
||||
import com.mogo.cloud.trafficlive.api.MoGoAiCloudTrafficLive;
|
||||
import com.mogo.cloud.utils.logger.Logger;
|
||||
@@ -27,6 +29,8 @@ public class MainActivity extends AppCompatActivity {
|
||||
private Button btnJumpLivePush;
|
||||
private Button btnJumpLivePlay;
|
||||
private Button btnRequestXINGLive;
|
||||
private Button btnRequestCarLive;
|
||||
private SurfaceView surfacePreviewView;
|
||||
|
||||
private TextView tvSn;
|
||||
private TextView tvToken;
|
||||
@@ -127,6 +131,44 @@ public class MainActivity extends AppCompatActivity {
|
||||
// });
|
||||
});
|
||||
|
||||
btnRequestXINGLive = findViewById(R.id.btnRequestXINGLive);
|
||||
btnRequestXINGLive.setOnClickListener(v -> {
|
||||
MoGoAiCloudTrafficLive.viewDesignativeIntersectionLive("556834859_trafficcamera_100514_89", new ITrafficIntersectionLiveCallBack() {
|
||||
@Override
|
||||
public void liveUrlResult(String liveUrl) {
|
||||
Logger.i(TAG, "liveUrl : " + liveUrl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String errorMsg) {
|
||||
Logger.e(TAG, "errorMsg : " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
btnRequestCarLive = findViewById(R.id.btnRequestCarLive);
|
||||
surfacePreviewView = findViewById(R.id.surfacePreviewView);
|
||||
btnRequestCarLive.setOnClickListener(v -> {
|
||||
MoGoAiCloudTrafficLive.viewFrontVehicleLive(40.11547, 116.22544,
|
||||
60, surfacePreviewView, new ITrafficCarLiveCallBack() {
|
||||
|
||||
@Override
|
||||
public void onLive(String liveSn) {
|
||||
Logger.e(TAG, "liveSn : " + liveSn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisConnect() {
|
||||
Logger.e(TAG, "onDisConnect");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String errorMsg) {
|
||||
Logger.e(TAG, "errorMsg");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
MoGoAiCloudClient.getInstance().addTokenCallbacks(new IMoGoTokenCallback() {
|
||||
@Override
|
||||
public void onTokenGot(String token, String sn) {
|
||||
|
||||
Reference in New Issue
Block a user