add log
This commit is contained in:
@@ -9,9 +9,11 @@ import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.realtime.Interface.IRealTimeProvider;
|
||||
import com.mogo.realtime.Interface.MoGoAiCloudRealTime;
|
||||
import com.mogo.realtime.entity.MogoSnapshotSetData;
|
||||
import com.mogo.realtime.socket.IMogoCloudOnMsgListener;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
/**
|
||||
* @author liujing
|
||||
@@ -30,7 +32,6 @@ public class RealTimeActivity extends AppCompatActivity implements IMogoCloudOnM
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_real_time);
|
||||
setConfig();
|
||||
|
||||
snapshotStartButton = findViewById(R.id.snapshotStart);
|
||||
snapshotStartButton.setOnClickListener(view -> {
|
||||
MoGoAiCloudRealTime.startRealTime(this, "com.mogo.launcher");
|
||||
@@ -43,8 +44,13 @@ public class RealTimeActivity extends AppCompatActivity implements IMogoCloudOnM
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置是否使用开发者提供的定位进行坐标上传
|
||||
* true:开发者提供定位点坐标上传
|
||||
* false:使用SDK内部定位点坐标上传
|
||||
*/
|
||||
private void setConfig() {
|
||||
MoGoAiCloudClient.getInstance().getAiCloudClientConfig().setIsUseExternalLocation(false);
|
||||
MoGoAiCloudClient.getInstance().getAiCloudClientConfig().setIsUseExternalLocation(true);
|
||||
}
|
||||
|
||||
public void stopRealTimeService() {
|
||||
|
||||
@@ -4,6 +4,7 @@ package com.mogo.realtime.spi;
|
||||
import com.elegant.spi.AbstractDelegateManager;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.realtime.Interface.IRealTimeProvider;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
/**
|
||||
* 提供RealTime SPI接口实例对象管理类
|
||||
@@ -25,10 +26,13 @@ class RealTimeProviderDelegateManager extends AbstractDelegateManager<IRealTimeP
|
||||
|
||||
public RealTimeProviderDelegateManager() {
|
||||
loadDelegates(MoGoAiCloudClient.getInstance().getContext(), IRealTimeProvider.class, (unit, p)
|
||||
-> mRealTimeProvider = p);
|
||||
-> {
|
||||
Logger.d("RealTimeProviderDelegateManager", "init provider : " + p);
|
||||
mRealTimeProvider = p;
|
||||
});
|
||||
}
|
||||
|
||||
public IRealTimeProvider getRealTimeProvider(){
|
||||
public IRealTimeProvider getRealTimeProvider() {
|
||||
return mRealTimeProvider;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.realtime.spi;
|
||||
import com.mogo.realtime.Interface.IRealTimeProvider;
|
||||
import com.mogo.realtime.entity.ADASRecognizedResult;
|
||||
import com.mogo.realtime.entity.CloudLocationInfo;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -26,6 +27,7 @@ public class RealTimeProviderImp implements IRealTimeProvider {
|
||||
}
|
||||
|
||||
public RealTimeProviderImp() {
|
||||
Logger.d("RealTimeProviderImp","init --->");
|
||||
mDelegate = RealTimeProviderDelegateManager.getInstance().getRealTimeProvider();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user