@@ -306,7 +306,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
}
|
||||
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MapApiPath.PATH, "CustomMapApiBuilder"));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(ServiceConst.PATH_TTS_CONFIG, ServiceConst.PATH_TTS_CONFIG));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(ShareConstants.TAG, ShareConstants.MODEL_NAME));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_TANLU_API, "TanluApi"));
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_TRAFFIC_UPLOAD, "TrafficUpload"));
|
||||
|
||||
@@ -63,11 +63,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
public static boolean isClickShare;
|
||||
|
||||
/**
|
||||
* 内部变量标识是否在vrMode,用于方法执行过滤,避免重复或异常调用
|
||||
*/
|
||||
private boolean localIsVrMode = false;
|
||||
|
||||
private final Runnable mLockCarRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -36,7 +36,6 @@ import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.common.datacenter.SnapshotLocationDataCenter;
|
||||
import com.mogo.module.common.entity.MarkerResponse;
|
||||
import com.mogo.module.common.map.Scene;
|
||||
import com.mogo.module.service.autopilot.AutoPilotRemoteController;
|
||||
import com.mogo.module.service.handler.MainLooperHandler;
|
||||
import com.mogo.module.service.handler.RefreshWorkThreadHandler;
|
||||
@@ -49,7 +48,6 @@ import com.mogo.module.service.refresh.AutoRefreshStrategy;
|
||||
import com.mogo.module.service.refresh.CustomRefreshStrategy;
|
||||
import com.mogo.module.service.refresh.RefreshObject;
|
||||
import com.mogo.module.service.timedelay.TimeDelayUploadManager;
|
||||
import com.mogo.module.service.ttsConfig.TtsConfigModleData;
|
||||
import com.mogo.realtime.api.MoGoAiCloudRealTime;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
import com.mogo.service.adas.IMogoAdasCarDataCallback;
|
||||
@@ -136,7 +134,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
private RefreshModel mRefreshModel;
|
||||
|
||||
private float mLastZoomLevel = 0;
|
||||
private TtsConfigModleData mTtsModle;
|
||||
private long mRefreshRemainingTime = Long.MAX_VALUE;
|
||||
// 上次手动操作的中心点坐标
|
||||
private MogoLatLng mLastCustomRefreshCenterLocation;
|
||||
@@ -294,22 +291,11 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 每次onResume的时候 在独立app里面播放系统配置的tts语音
|
||||
*/
|
||||
public void playAppTts() {
|
||||
if ( DebugConfig.isLauncher() ) {
|
||||
return;
|
||||
}
|
||||
mTtsModle.playTts();
|
||||
}
|
||||
|
||||
|
||||
public void preInit( Context context ) {
|
||||
mContext = context;
|
||||
|
||||
mRefreshModel = new RefreshModel( context );
|
||||
mTtsModle = new TtsConfigModleData();
|
||||
mMogoMapService = MarkerServiceHandler.getMapService();
|
||||
mUiController = mMogoMapService.getMapUIController();
|
||||
|
||||
|
||||
@@ -18,10 +18,6 @@ public class ServiceConst {
|
||||
*/
|
||||
public static final String PATH_REFRESH_STRATEGY = "/strategy/refresh";
|
||||
|
||||
/**
|
||||
* tts语音配置
|
||||
*/
|
||||
public static final String PATH_TTS_CONFIG = "/ttsserver/tts";
|
||||
|
||||
/**
|
||||
* 倒计时消息
|
||||
|
||||
@@ -83,7 +83,6 @@ abstract class StatusChangedAdapter implements IMogoStatusChangedListener {
|
||||
}
|
||||
mIsMainPageFirstResume = false;
|
||||
LauncherCardRefresher.getInstance(AbsMogoApplication.getApp()).stop();
|
||||
MogoServices.getInstance().playAppTts();
|
||||
} else {
|
||||
MogoServices.getInstance().unregisterInternalUnWakeupWords();
|
||||
MogoServices.getInstance().stopAutoRefreshStrategy();
|
||||
|
||||
@@ -32,7 +32,7 @@ public class DispatchAirportDialog extends DispatchBaseDialog {
|
||||
tvTaskTime = findViewById(R.id.module_services_dispatch_dialog_task_time);
|
||||
tvFlightInfo = findViewById(R.id.module_services_dispatch_dialog_flight_time);
|
||||
tvTaskContent = findViewById(R.id.module_services_dispatch_dialog_task_content);
|
||||
Button btnAffirm = (Button) findViewById(R.id.module_services_dispatch_dialog_confirm);
|
||||
Button btnAffirm = findViewById(R.id.module_services_dispatch_dialog_confirm);
|
||||
btnAffirm.setOnClickListener(v -> {
|
||||
if (mListener != null) {
|
||||
mListener.affirm();
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.mogo.module.service.ttsConfig;
|
||||
|
||||
import com.mogo.module.service.network.bean.TtsConfigEntity;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import retrofit2.http.GET;
|
||||
|
||||
/**
|
||||
* @author :zhuangyan
|
||||
* @date : 2020/11/16 15:09
|
||||
* @desc :
|
||||
*/
|
||||
public interface TtsConfigApiService {
|
||||
/**
|
||||
* 查询语音Tts 的
|
||||
*
|
||||
*/
|
||||
@GET("/dataService/car/ttsWord/no/getTTSWord/v1")
|
||||
Observable<TtsConfigEntity> inquireForTts();
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
package com.mogo.module.service.ttsConfig;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.network.RequestOptions;
|
||||
import com.mogo.eagle.core.network.SubscribeImpl;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.constants.HostConst;
|
||||
import com.mogo.module.service.network.bean.TtsConfigEntity;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
import static com.mogo.commons.AbsMogoApplication.getApp;
|
||||
|
||||
/**
|
||||
* @author :zhuangyan
|
||||
* @date : 2020/11/16 15:04
|
||||
* @desc :
|
||||
*/
|
||||
public class TtsConfigModleData {
|
||||
private static final String TAG = "TrafficModelData";
|
||||
private final TtsConfigApiService mTtsConfigApiService;
|
||||
|
||||
|
||||
public TtsConfigModleData() {
|
||||
mTtsConfigApiService = MogoApisHandler.getInstance().getApis().getNetworkApi().create(TtsConfigApiService.class, HostConst.DATA_SERVICE_HOST);
|
||||
}
|
||||
|
||||
/**
|
||||
* 独立app根据后台配置 播放tts
|
||||
*
|
||||
* @param
|
||||
* @param
|
||||
* @param
|
||||
*/
|
||||
public void playTts() {
|
||||
|
||||
if (DebugConfig.isLauncher()) {
|
||||
return;
|
||||
}
|
||||
mTtsConfigApiService.inquireForTts()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<TtsConfigEntity>(RequestOptions.create(getApp().getApplicationContext())) {
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
Log.e("zytest", e.toString());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(TtsConfigEntity o) {
|
||||
super.onSuccess(o);
|
||||
Log.e("zytest", "播放语音了====" + o.getResult().getWord());
|
||||
if (!TextUtils.isEmpty(o.getResult().getWord())) {
|
||||
AIAssist.getInstance(getApp().getApplicationContext()).speakTTSVoice(o.getResult().getWord());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.mogo.module.service.ttsConfig;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.module.service.network.RefreshCallback;
|
||||
import com.mogo.module.service.network.bean.TtsConfigEntity;
|
||||
|
||||
/**
|
||||
* @author :zhuangyan
|
||||
* @date : 2020/11/16 15:01
|
||||
* @desc :进入页面的时候 根据配置 播放tts语音
|
||||
*/
|
||||
@Route(path = ServiceConst.PATH_TTS_CONFIG)
|
||||
public class TtsConfigProvider implements IProvider {
|
||||
private final String TAG = "TtsConfigProvider";
|
||||
private Context mContext;
|
||||
private TtsConfigModleData mTtsModleData;
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
mContext = context;
|
||||
Log.d(TAG, "TtsConfigProvider provider init……");
|
||||
if (mTtsModleData == null) {
|
||||
mTtsModleData = new TtsConfigModleData();
|
||||
}
|
||||
|
||||
mTtsModleData.playTts();
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.mogo.module.service.utils;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.service.cloud.location.CloudLocationInfo;
|
||||
|
||||
/**
|
||||
* 定位数据类型转换工具
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class LocationParseUtil {
|
||||
|
||||
public static MogoLatLng cloudLocationToMogoLatLng(CloudLocationInfo info) {
|
||||
if (info == null) {
|
||||
return null;
|
||||
}
|
||||
return new MogoLatLng(info.getLat(), info.getLon());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user