From 2089e2578ea65d8d2facca08e1c8ed465f1c9462 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Mon, 8 Nov 2021 20:32:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BA=86MoGoWarningProvider.?= =?UTF-8?q?kt=EF=BC=8C=20=E7=94=B1MoGoHmiFragment=E6=8E=A5=E7=AE=A1?= =?UTF-8?q?=E5=A4=84=E7=90=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .idea/misc.xml | 3 +- .../core/function/hmi/ui/MoGoHmiFragment.kt | 57 +++- .../function/hmi/ui/MoGoWarningContract.kt | 123 ------- .../hmi/warning/MoGoWarningProvider.kt | 130 -------- .../api/base/IMoGoFunctionProvider.kt | 1 - .../api/hmi/warning/IMoGoWaringProvider.kt | 1 - .../call/hmi/CallerHmiFloatViewManager.kt | 14 + .../com/mogo/commons/AbsMogoApplication.java | 21 +- .../com/mogo/module/map/NavConstants.java | 312 ------------------ .../com/mogo/module/map/VoiceConstants.java | 23 -- 10 files changed, 75 insertions(+), 610 deletions(-) delete mode 100644 core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/warning/MoGoWarningProvider.kt create mode 100644 core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiFloatViewManager.kt delete mode 100644 modules/mogo-module-map/src/main/java/com/mogo/module/map/NavConstants.java diff --git a/.idea/misc.xml b/.idea/misc.xml index c8ae21910b..67f01b45e4 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -22,6 +22,7 @@ + @@ -41,7 +42,7 @@ - + diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt index 10a8769628..37c2e958c1 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt @@ -1,26 +1,34 @@ package com.mogo.eagle.core.function.hmi.ui import android.animation.Animator +import android.content.Context import android.text.TextUtils +import android.util.Log import android.view.Gravity import android.view.View import android.view.WindowManager import android.view.animation.OvershootInterpolator +import androidx.fragment.app.Fragment +import androidx.fragment.app.FragmentActivity +import com.alibaba.android.arouter.facade.annotation.Route import com.mogo.commons.mvp.MvpFragment import com.mogo.commons.voice.AIAssist import com.mogo.eagle.core.data.camera.Camera +import com.mogo.eagle.core.data.constants.MogoServicePaths import com.mogo.eagle.core.data.enums.WarningDirectionEnum import com.mogo.eagle.core.data.notice.NoticeNormalData import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData +import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWaringProvider import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener import com.mogo.eagle.core.function.call.monitor.CallerMonitorManager import com.mogo.eagle.core.function.hmi.R +import com.mogo.eagle.core.function.hmi.WaringConst import com.mogo.eagle.core.function.hmi.notification.WarningFloat import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator import com.mogo.eagle.core.function.hmi.notification.enums.SidePattern +import com.mogo.eagle.core.function.hmi.ui.camera.CameraListView import com.mogo.eagle.core.function.hmi.ui.notice.NoticeBannerView import com.mogo.eagle.core.function.hmi.ui.notice.NoticeFloatView -import com.mogo.eagle.core.function.hmi.ui.camera.CameraListView import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView import com.mogo.module.common.enums.EventTypeEnum import com.mogo.utils.logger.Logger @@ -31,13 +39,38 @@ import kotlinx.android.synthetic.main.fragment_hmi.* * @date 2021/8/3 2:40 下午 * 预警图层 */ +@Route(path = MogoServicePaths.PATH_V2X_WARNING) class MoGoHmiFragment : MvpFragment(), + IMoGoWaringProvider, MoGoWarningContract.View { + private val TAG = "MoGoHmiFragment" - var mWarningFloat: WarningFloat.Builder? = null + private var mMoGoHmiFragment: MoGoHmiFragment? = null + + private var mWarningFloat: WarningFloat.Builder? = null private var cameraListView: CameraListView? = null private var cameraViewFloat: WarningFloat.Builder? = null + + override fun init(context: Context?) { + Logger.d(TAG, "初始化蘑菇预警模块 ……") + } + + override fun vipIdentification(visible: Boolean) { + flVipIdentificationView.visibility = if (visible) View.VISIBLE else View.GONE + } + + override fun createCoverage(activity: FragmentActivity?, containerId: Int?): Fragment { + Logger.d(TAG, "初始化蘑菇HMI模块 Fragment……") + if (mMoGoHmiFragment == null) { + mMoGoHmiFragment = MoGoHmiFragment() + } + return mMoGoHmiFragment as MoGoHmiFragment + } + + override val functionName: String + get() = WaringConst.MODULE_NAME + override fun initViews() { ivCameraIcon.setOnClickListener { if (cameraViewFloat == null) { @@ -152,7 +185,7 @@ class MoGoHmiFragment : MvpFragment * 关闭指定floatTag 的 VR下V2X预警弹窗 * @param tag 弹窗标识 */ - override fun disableWarningV2X(tag: String) { + override fun disableWarningV2X(tag: String?) { activity?.let { WarningFloat.dismiss(tag) } @@ -239,12 +272,10 @@ class MoGoHmiFragment : MvpFragment * 展示云公告顶部弹窗 * @param trafficStylePushData */ - override fun showNoticeForTrafficWithData(trafficStylePushData: NoticeTrafficStylePushData) { + override fun showNoticeForTrafficWithData(trafficStylePushData: NoticeTrafficStylePushData?) { activity.let { - val noticeBannerView = this.getContext()?.let { it1 -> NoticeBannerView(it1) } - if (noticeBannerView != null) { - noticeBannerView.refreshWithData(trafficStylePushData) - } + val noticeBannerView = this.context?.let { it1 -> NoticeBannerView(it1) } + noticeBannerView?.refreshWithData(trafficStylePushData) mWarningFloat = it?.let { it1 -> noticeBannerView?.let { it2 -> WarningFloat.with(it1) @@ -291,11 +322,7 @@ class MoGoHmiFragment : MvpFragment var floatView: NoticeFloatView? = null - /** - * 展示普通公告 - * @param normalData - */ - override fun showNoticeNormal(normalData: NoticeNormalData) { + override fun showNoticeNormalData(normalData: NoticeNormalData?) { if (floatView == null) { floatView = this.context?.let { NoticeFloatView(it) } } @@ -372,9 +399,7 @@ class MoGoHmiFragment : MvpFragment override fun onDestroy() { super.onDestroy() - } - override fun vipIdentification(visible: Boolean) { - flVipIdentificationView.visibility = if (visible) View.VISIBLE else View.GONE + Log.d(TAG, "onDestroy") } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoWarningContract.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoWarningContract.kt index fe505c8970..b9916ef0da 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoWarningContract.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoWarningContract.kt @@ -15,128 +15,5 @@ interface MoGoWarningContract { interface View : IView { - /** - * 隐藏 脉速表 - * @param visibility View.VISIBLE, View.INVISIBLE,View.GONE - */ - fun setSpeedChartViewVisibility(visibility: Int) - - /** - * 隐藏 自动驾驶触发 按钮 - * @param visibility View.VISIBLE, View.INVISIBLE,View.GONE - */ - fun setAutopilotStatusViewVisibility(visibility: Int) - - /** - * 隐藏 切换视角 按钮 - * @param visibility View.VISIBLE, View.INVISIBLE,View.GONE - */ - fun setPerspectiveSwitchViewVisibility(visibility: Int) - - /** - * 隐藏 检测状态 按钮 - * @param visibility View.VISIBLE, View.INVISIBLE,View.GONE - */ - fun setCheckStatusViewVisibility(visibility: Int) - - /** - * 展示VR下V2X预警 - * - * @param v2xType V2X类型 - * @param alertContent 提醒文本 - * @param ttsContent tts语音播报消息 - * @param tag tag绑定弹窗的标志 - */ - fun showWarningV2X( - v2xType: Int, - alertContent: String?, - ttsContent: String?, - tag: String?, - listenerIMoGo: IMoGoWarningStatusListener? - ) - - /** - * 关闭指定floatTag 的 VR下V2X预警弹窗 - * @param tag 弹窗标识 - */ - fun disableWarningV2X(tag: String) - - /** - * 展示红绿灯预警 - * - * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 - */ - fun showWarningTrafficLight(checkLightId: Int) - - /** - * 关闭红绿灯预警 - */ - fun disableWarningTrafficLight() - - /** - * 修改红灯倒计时 - */ - fun changeCountdownRed(redNum: Int) - - /** - * 修改黄灯倒计时 - */ - fun changeCountdownYellow(yellowNum: Int) - - /** - * 修改绿灯倒计时 - */ - fun changeCountdownGreen(greenNum: Int) - - /** - * @param readNum 红灯倒计时 - * @param yellowNum 黄灯倒计时 - * @param greenNum 绿灯倒计时 - */ - fun changeCountdownTrafficLightNum(readNum: Int, yellowNum: Int, greenNum: Int) - - /** - * 展示限速预警 - * - * @param limitingSpeed 限速速度 - */ - fun showLimitingVelocity(limitingSpeed: Int) - - /** - * 关闭限速预警 - */ - fun disableLimitingVelocity() - - /** - * 展示指定方位上的红框预警 - * @param direction - * @see WarningDirectionEnum - */ - fun showWarning(direction: WarningDirectionEnum) - - /** - * 展示指定方位上的红框预警 - * @param direction - * @see WarningDirectionEnum - * @param closeTime 倒计时 - */ - fun showWarning(direction: WarningDirectionEnum, closeTime: Long) - - /** - * 展示云公告顶部弹窗 - * @param trafficStylePushData - */ - fun showNoticeForTrafficWithData(trafficStylePushData: NoticeTrafficStylePushData) - - /** - * 展示普通云公告 - * @param normalData - */ - fun showNoticeNormal(normalData: NoticeNormalData) - - /** - * 展示VIP标识 - */ - fun vipIdentification(visible: Boolean) } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/warning/MoGoWarningProvider.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/warning/MoGoWarningProvider.kt deleted file mode 100644 index 5459b2225e..0000000000 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/warning/MoGoWarningProvider.kt +++ /dev/null @@ -1,130 +0,0 @@ -package com.mogo.eagle.core.function.hmi.warning - -import android.content.Context -import android.util.Log -import androidx.fragment.app.Fragment -import androidx.fragment.app.FragmentActivity -import com.alibaba.android.arouter.facade.annotation.Route -import com.mogo.eagle.core.data.camera.Camera -import com.mogo.eagle.core.data.constants.MogoServicePaths -import com.mogo.eagle.core.data.enums.WarningDirectionEnum -import com.mogo.eagle.core.data.notice.NoticeNormalData -import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData -import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWaringProvider -import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener -import com.mogo.eagle.core.function.hmi.WaringConst -import com.mogo.eagle.core.function.hmi.ui.MoGoHmiFragment -import com.mogo.utils.logger.Logger - -/** - * @author xiaoyuzhou - * @date 2021/8/2 5:52 下午 - * 预警模块 - */ -@Route(path = MogoServicePaths.PATH_V2X_WARNING) -class MoGoWarningProvider : IMoGoWaringProvider { - private val TAG = "MoGoWarningProvider" - private var mMoGoHmiFragment: MoGoHmiFragment? = null - private var mContext: Context? = null - override fun init(context: Context) { - Logger.d(TAG, "初始化蘑菇预警模块 ……") - mContext = context - } - - override fun createCoverage(activity: FragmentActivity?, containerId: Int?): Fragment? { - Logger.d(TAG, "初始化蘑菇预警模块 Fragment……") - mMoGoHmiFragment = MoGoHmiFragment() - return mMoGoHmiFragment - } - - override val functionName: String - get() = WaringConst.MODULE_NAME - - override fun showWarningTrafficLight(checkLightId: Int) { - mMoGoHmiFragment?.showWarningTrafficLight(checkLightId) - } - - override fun disableWarningTrafficLight() { - mMoGoHmiFragment?.disableWarningTrafficLight() - } - - override fun showLimitingVelocity(limitingSpeed: Int) { - mMoGoHmiFragment?.showLimitingVelocity(limitingSpeed) - } - - override fun disableLimitingVelocity() { - mMoGoHmiFragment?.disableLimitingVelocity() - } - - override fun changeCountdownRed(redNum: Int) { - mMoGoHmiFragment?.changeCountdownRed(redNum) - } - - override fun changeCountdownYellow(yellowNum: Int) { - mMoGoHmiFragment?.changeCountdownYellow(yellowNum) - } - - override fun changeCountdownGreen(greenNum: Int) { - mMoGoHmiFragment?.changeCountdownGreen(greenNum) - } - - override fun changeCountdownTrafficLightNum(readNum: Int, yellowNum: Int, greenNum: Int) { - mMoGoHmiFragment?.changeCountdownTrafficLightNum(readNum, yellowNum, greenNum) - } - - override fun setSpeedChartViewVisibility(visibility: Int) { - mMoGoHmiFragment?.setSpeedChartViewVisibility(visibility) - } - - override fun setAutopilotStatusViewVisibility(visibility: Int) { - mMoGoHmiFragment?.setAutopilotStatusViewVisibility(visibility) - } - - override fun setPerspectiveSwitchViewVisibility(visibility: Int) { - mMoGoHmiFragment?.setPerspectiveSwitchViewVisibility(visibility) - } - - override fun setCheckStatusViewVisibility(visibility: Int) { - mMoGoHmiFragment?.setCheckStatusViewVisibility(visibility) - } - - override fun showWarningV2X( - v2xType: Int, alertContent: String?, - ttsContent: String?, tag: String?, - listenerIMoGo: IMoGoWarningStatusListener? - ) { - mMoGoHmiFragment?.showWarningV2X(v2xType, alertContent, ttsContent, tag, listenerIMoGo) - } - - override fun disableWarningV2X(tag: String?) { - mMoGoHmiFragment?.disableWarningV2X(tag!!) - } - - override fun showWarning(direction: WarningDirectionEnum) { - mMoGoHmiFragment?.showWarning(direction) - } - - override fun showWarning(direction: WarningDirectionEnum, closeTime: Long) { - mMoGoHmiFragment?.showWarning(direction, closeTime) - } - - override fun showNoticeForTrafficWithData(pushData: NoticeTrafficStylePushData?) { - if (pushData != null) { - mMoGoHmiFragment?.showNoticeForTrafficWithData(pushData) - }; - } - - override fun showNoticeNormalData(normalData: NoticeNormalData?) { - if (normalData != null) { - mMoGoHmiFragment?.showNoticeNormal(normalData) - } - } - - override fun vipIdentification(visible: Boolean) { - mMoGoHmiFragment?.vipIdentification(visible) - } - - override fun onDestroy() { - Log.d(TAG, "onDestroy") - } -} \ No newline at end of file diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/base/IMoGoFunctionProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/base/IMoGoFunctionProvider.kt index 6451b1fdab..62bd4dee13 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/base/IMoGoFunctionProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/base/IMoGoFunctionProvider.kt @@ -1,6 +1,5 @@ package com.mogo.eagle.core.function.api.base -import android.os.Bundle import androidx.annotation.IdRes import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentActivity diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoWaringProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoWaringProvider.kt index 624ec9de3b..d716aa6458 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoWaringProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoWaringProvider.kt @@ -1,6 +1,5 @@ package com.mogo.eagle.core.function.api.hmi.warning -import com.mogo.eagle.core.data.camera.Camera import com.mogo.eagle.core.data.enums.WarningDirectionEnum import com.mogo.eagle.core.data.notice.NoticeNormalData import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiFloatViewManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiFloatViewManager.kt new file mode 100644 index 0000000000..28a1224340 --- /dev/null +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiFloatViewManager.kt @@ -0,0 +1,14 @@ +package com.mogo.eagle.core.function.call.hmi + +/** + * @author xiaoyuzhou + * @date 2021/9/23 10:22 上午 + * HMI 悬浮控件管理 + */ +object CallerHmiFloatViewManager { + + private val TAG = "CallerHmiFloatViewManager" + + + +} \ No newline at end of file diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java index 94e122c543..05fb0dc151 100644 --- a/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java +++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java @@ -23,10 +23,10 @@ import com.mogo.commons.network.Constants; import com.mogo.commons.network.ParamsUtil; import com.mogo.commons.network.X509TrustManagerImpl; import com.mogo.commons.storage.SpStorage; -import com.mogo.eagle.core.utilcode.util.Utils; -import com.mogo.utils.ThreadPoolService; import com.mogo.eagle.core.utilcode.mogo.toast.TipDrawable; import com.mogo.eagle.core.utilcode.mogo.toast.TipToast; +import com.mogo.eagle.core.utilcode.util.Utils; +import com.mogo.utils.ThreadPoolService; import com.mogo.utils.logger.Logger; import com.mogo.utils.network.NetConfig; @@ -110,6 +110,9 @@ public abstract class AbsMogoApplication extends Application { })); } + /** + * 初始化自定义 Toast View + */ private View generateToastView(Context context, String message, TipDrawable tipDrawable) { View contentView; if (tipDrawable == null) { @@ -143,6 +146,9 @@ public abstract class AbsMogoApplication extends Application { return sc; } + /** + * 异步初始化 + */ protected void asyncInit() { ThreadPoolService.execute(() -> { initNetConfig(); @@ -156,12 +162,17 @@ public abstract class AbsMogoApplication extends Application { }); } + /** + * 异步厨初始化 + */ protected void asyncInitImpl() { } + /** + * 初始化网络配置 + */ private static void initNetConfig() { - try { SSLContext sc = getSslContext(); NetConfig.instance().setSslContext(sc); @@ -192,8 +203,12 @@ public abstract class AbsMogoApplication extends Application { .setLoggable(DebugConfig.isDebug()); } + // 缓存IP地址 private String cacheIp = null; + /** + * 请求获取最新的 DNS 微服务 域名信息 + */ protected void registerSocketHttpDnsTTL(String host) { sApis.addressChangedListener(map -> { Logger.d("TEST-SOCKET", "ttl callBack ,ready to getCache Dns IP"); diff --git a/modules/mogo-module-map/src/main/java/com/mogo/module/map/NavConstants.java b/modules/mogo-module-map/src/main/java/com/mogo/module/map/NavConstants.java deleted file mode 100644 index f1b3bdb419..0000000000 --- a/modules/mogo-module-map/src/main/java/com/mogo/module/map/NavConstants.java +++ /dev/null @@ -1,312 +0,0 @@ -package com.mogo.module.map; - -public class NavConstants { - - public interface NativeApi { - /** - * 导航去某地 - */ - String NATIVE_API_NAVI = "com.ileja.navi.address.get"; - /** - * 继续导航 - */ - String NATIVE_API_NAVI_CONTINUE = "com.ileja.navi.continue.get"; - /** - * 途径点设置 - */ - String NATIVE_API_NAVI_PASSPOI = "com.ileja.navi.passpoi.address.get"; - /** - * 沿途搜索 - */ - String NATIVE_API_NAVI_WAY_SEARCH = "com.ileja.navi.along.route.poi.query"; - /** - *导航路状态 - */ - String NATIVE_API_NAVI_STATUS_QUERY = "com.ileja.navi.status.query"; - /** - * 下一个服务区查询 service area - */ - String NATIVE_API_NAVI_NEXT_SERVICEAREA = "com.ileja.navi.sapa.query"; - /** - * 导航常用地址 - */ - String NATIVE_API_NAVI_GET_COMMON_ADDRESS = "com.ileja.navi.address.common.get"; - /** - * 提供地址 设置家/公司 - */ - String NATIVE_API_NAVI_COMMON_ADDRESS = "com.ileja.navi.common.get"; - /** - * 设在当前位置 - */ - String NATIVE_API_NAVI_CURRENT_ADDRESS = "com.ileja.navi.common.current.get"; - /** - * 导航指令 - */ - String NATIVE_API_NAVI_INI_GET = "com.ileja.navi.ini.get"; - /** - * 沿途路况 - */ - String NATIVE_API_NAVI_WAY_TRAFFIC= "com.ileja.traffic.poi.get"; - - /** - * 前方路况 - */ - String NATIVE_API_NAVI_FRONT_TRAFFIC= "com.ileja.traffic.front.get"; - - } - - interface WakeUpCommandApi { - /** - * 放大地图 - */ - String COMMAND_MAP_FLEX_UP = "com.zhidao.map.flex.up"; - /** - * 缩小地图 - */ - String COMMAND_MAP_FLEX_DOWN= "com.zhidao.map.flex.down"; - /** - * 白天模式 - */ - String COMMAND_MAP_MODE_DAY= "com.zhidao.map.mode.day"; - /** - * 夜晚模式 - */ - String COMMAND_MAP_MODE_NIGHT= "com.zhidao.map.mode.night"; - /** - * 自动模式 - */ - String COMMAND_MAP_MODE_AUTO= "com.zhidao.map.mode.auto"; - - /** - * * 地图设置为2d 车上模式 - */ - String COMMAND_MAP_NAVI_OPEN_2D_CAR = "com.zhidao.map.navi.open.2dcar"; - /** - * 地图设置为2d 北上模式 - */ - String COMMAND_MAP_NAVI_OPEN_2D_NORTH = "com.zhidao.map.navi.open.2dnorth"; - /** - * 地图设置为3d模式 - */ - String COMMAND_MAP_NAVI_OPEN_3D = "com.zhidao.map.navi.open.3d"; - /** - * 导航偏好设置 推荐路线(导航场景) //推荐路线/躲避拥堵/高速优先/少收费/避免收费/不走高速 - */ - String COMMAND_MAP_NAVI_PREFERENCE_RECOMMEND = "com.zhidao.map.preference.recommend"; - /** - * 导航偏好设置 躲避拥堵(导航场景) - */ - String COMMAND_MAP_NAVI_PREFERENCE_AVOID_BLOCK = "com.zhidao.map.preference.avoid.block"; - /** - * 导航偏好设置 高速优先(导航场景) - */ - String COMMAND_MAP_NAVI_PREFERENCE_HIGHSPEED = "com.zhidao.map.preference.high.speed"; - /** - * 导航偏好设置 少收费(导航场景) - */ - String COMMAND_MAP_NAVI_PREFERENCE_LESS_CHARGE = "com.zhidao.map.preference.less.charge"; - /** - * 导航偏好设置 避免收费(导航场景) - */ - String COMMAND_MAP_NAVI_PREFERENCE_NO_CHARGE= "com.zhidao.map.preference.no.charge"; - /** - * 导航偏好设置 不走高速(导航场景) - */ - String COMMAND_MAP_NAVI_NO_HIGH_SPEED = "com.zhidao.map.preference.avoid.highspeed"; - /** - * 打开实况模式 - */ - String COMMAND_MAP_NAVI_OPEN_LIVE = "com.zhidao.map.navi.open.live"; - /** - * 关闭实况模式 - */ - String COMMAND_MAP_NAVI_CLOSE_LIVE = "com.zhidao.map.navi.close.live"; - /** - * 进入全览 - */ - String COMMAND_MAP_NAVI_ENTER_OVERVIEW = "com.zhidao.map.navi.enter.overview"; - - /** - * 退出全览 - */ - String COMMAND_MAP_NAVI_EXIT_OVERVIEW = "com.zhidao.map.navi.exit.overview"; - - /** - * 继续导航 返回导航 - */ - String COMMAND_MAP_NAVI_OVERVIEW_BACK_NAVI = "com.zhidao.map.navi.backnavi"; - - /** - * 刷新路线 - */ - String COMMAND_MAP_NAVI_REFRESH_PATH= "com.zhidao.map.navi.refresh.path"; - - /** - * 选择线路 - */ - String COMMAND_MAP_SELECT_PATH1 = "com.zhidao.map.select.path1"; - String COMMAND_MAP_SELECT_PATH2 = "com.zhidao.map.select.path2"; - String COMMAND_MAP_SELECT_PATH3 = "com.zhidao.map.select.path3"; - - /** - * 继续导航 确定 - */ - String COMMAND_ZHIDAO_CONTINUE_SURE = "com.zhidao.contine.sure"; - /** - * 继续导航 取消 - */ - String COMMAND_ZHIDAO_CONTINUE_CANCLE = "com.zhidao.contine.cancle"; - /** - * 规划界面 确定 - */ - String COMMAND_ZHIDAO_PLAN_SURE = "com.zhidao.plan.sure"; - /** - * 规划界面 取消 - */ - String COMMAND_ZHIDAO_PLAN_CANCLE = "com.zhidao.v.cancle"; - - /** - * 关闭地图 - */ - String COMMAND_MAP_CLOSEMAP = "com.zhidao.map.close"; - } - - interface CommmandApi { - /** - * 选择导航 - */ - String COMMAND_NAVI_RESULT_SELECT = "com.ileja.navi.jump.route"; - - /** - * 继续导航 - */ - String COMMAND_NAVI_CONTINUE = "com.ileja.navi.route.continue"; - /** - * 导航过程中增加途径点 - */ - String COMMAND_NAVI_ADD_PASSPOINT = "com.ileja.navi.passpoi.address.result"; - /** - * 目的地纠错 - */ - String COMMAND_NAVI_CHANGE_DES = "com.ileja.navi.address.change"; - - /** - * 酒店查询 - */ - String COMMAND_HOTEL_SELECT = "com.aispeech.hotel.select"; - /** - * 美食查询 - */ - String COMMAND_FOOD_SELECT = "com.aispeech.food.select"; - /** - * 查询我的位置 - */ - String COMMAND_NAVI_MYLOCATION = "com.ileja.navi.mylocation.query"; - /** - * 白天模式 - */ - String COMMAND_NAVI_DAY_MODE = "com.ileja.navi.mode.daytime"; - - /** - * 夜晚模式 - */ - String COMMAND_NAVI_NIGHT_MODE = "com.ileja.navi.mode.night"; - /** - * 夜晚模式 - */ - String COMMAND_NAVI_AUTODAY_MODE = "com.ileja.navi.mode.autodaynight"; - /** - * 打开实况 - */ - String COMMAND_NAVI_TRAFFIC_OPEN = "com.ileja.navi.traffic.open"; - /** - * 关闭实况 - */ - String COMMAND_NAVI_TRAFFIC_CLOSE = "com.ileja.navi.traffic.close"; - /** - * 车头朝上 - */ - String COMMAND_NAVI_TRAFFIC_HEAD_UP = "com.ileja.traffic.head.up"; - /** - * 北朝上 - */ - String COMMAND_NAVI_TRAFFIC_NORTH_UP = "com.ileja.traffic.north.up"; - /** - * 选择沿途搜索 - */ - String COMMAND_NAVI_AWAY_SEARCH = "com.ileja.navi.along.route.poi.select"; - /** - * 打开地图相关操作 - */ - String COMMAND_NAVI_OPEN_MAP = "com.ileja.navi.map.open"; - /** - * 退出地图相关操作 - */ - String COMMAND_NAVI_CLOSE_MAP = "com.ileja.navi.map.close"; - - /** - * 退出导航 - */ - String COMMAND_NAVI_EXIT_NAVI = "com.ileja.navi.exit"; - /** - * 放大地图 - */ - String COMMAND_NAVI_MAP_ENLARGE = "com.ileja.navi.map.enlarge"; - /** - * 缩小地图 - */ - String COMMAND_NAVI_MAP_REDUCE = "com.ileja.navi.map.reduce"; - /** - * 全览图 - */ - String COMMAND_NAVI_FULL_MAP = "com.ileja.navi.map.full"; - /** - * 3D模式 - */ - String COMMAND_NAVI_MODE_3D = "com.ileja.navi.mode.3d"; - /** - * 2D模式 - */ - String COMMAND_NAVI_MODE_2D = "com.ileja.navi.mode.2d"; - - /** - * 收藏当前位置 - */ - String COMMAND_NAVI_COLLECTION_CURRENT= "com.ileja.navi.collection.location"; - - /** - * 设在当前位置 - */ - String COMMAND_NAVI_COMMON_CURRENT= "com.ileja.navi.common.current"; - /** - * 导航剩余距离 - */ - String COMMAND_NAVI_QUERY_DISTANCE= "com.ileja.navi.remaining.distance"; - /** - * 导航剩時間 - */ - String COMMAND_NAVI_QUERY_TIME= "com.ileja.navi.remaining.time"; - - /** - * 查询路况 - */ - String COMMAND_NAVI_QUERY_TRAFFIC= "com.ileja.traffic.show"; - - /** - * 去常用地址的沿途路况 - */ - String COMMAND_NAVI_COMMON_SIT= "com.ileja.traffic.turn.common.site"; - - - /** - * 拥堵情况 - */ - String COMMAND_NAVI_WAY_TRAFFIC= "com.ileja.traffic.route"; - - - /** - * 航班查询 - */ - String COMMAND_FLIGHT_RESULT= "native.flight.result"; - } -} diff --git a/modules/mogo-module-map/src/main/java/com/mogo/module/map/VoiceConstants.java b/modules/mogo-module-map/src/main/java/com/mogo/module/map/VoiceConstants.java index c64d9871b3..3a561306be 100644 --- a/modules/mogo-module-map/src/main/java/com/mogo/module/map/VoiceConstants.java +++ b/modules/mogo-module-map/src/main/java/com/mogo/module/map/VoiceConstants.java @@ -21,20 +21,6 @@ public class VoiceConstants { public static final String CMD_MAP_ZOOM_IN_UN_WAKEUP = "CMD_MAP_ZOOM_IN_UN_WAKEUP"; public static final String[] CMD_MAP_ZOOM_IN_TRIGGER_WORDS = {"放大地图"}; - ///** - // * 回家 - // */ - //public static final String CMD_MAP_GO_HOME = "com.ileja.navi.map.go.home"; - //public static final String CMD_MAP_GO_HOME_UN_WAKEUP = "CMD_MAP_GO_HOME_UN_WAKEUP"; - //public static final String[] CMD_MAP_ZOOM_IN_GO_HOME = {"我要回家", "导航回家", "带我回家"}; - // - ///** - // * 去公司 - // */ - //public static final String CMD_MAP_GO_COMPANY = "com.ileja.navi.map.go.company"; - //public static final String CMD_MAP_GO_COMPANY_UN_WAKEUP = "CMD_MAP_GO_COMPANY_UN_WAKEUP"; - //public static final String[] CMD_MAP_ZOOM_IN_GO_COMPANY = {"我要去公司", "导航去公司", "带我去公司"}; - /** * 导航历史记录 */ @@ -185,22 +171,13 @@ public class VoiceConstants { // 免唤醒 sVoiceCmds.put( VoiceConstants.CMD_MAP_ZOOM_IN_UN_WAKEUP, VoiceConstants.CMD_MAP_ZOOM_IN_TRIGGER_WORDS ); sVoiceCmds.put( VoiceConstants.CMD_MAP_ZOOM_OUT_UN_WAKEUP, VoiceConstants.CMD_MAP_ZOOM_OUT_TRIGGER_WORDS ); - //sVoiceCmds.put( VoiceConstants.CMD_MAP_2D_UN_WAKEUP, VoiceConstants.CMD_MAP_2D_TRIGGER_WORDS ); - //sVoiceCmds.put( VoiceConstants.CMD_MAP_3D_UN_WAKEUP, VoiceConstants.CMD_MAP_3D_TRIGGER_WORDS ); sVoiceCmds.put( VoiceConstants.CMD_MAP_TRAFFIC_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_TRAFFIC_MODE_TRIGGER_WORDS ); sVoiceCmds.put( VoiceConstants.CMD_MAP_UN_TRAFFIC_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_UN_TRAFFIC_MODE_TRIGGER_WORDS ); - //sVoiceCmds.put( VoiceConstants.CMD_MAP_DISPLAY_OVERVIEW_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_DISPLAY_OVERVIEW_MODE_TRIGGER_WORDS ); - //sVoiceCmds.put( VoiceConstants.CMD_MAP_CONTINUE_NAVI_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_CONTINUE_NAVI_MODE_MODE_TRIGGER_WORDS ); sVoiceCmds.put( VoiceConstants.CMD_MAP_CAR_UP_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_CAR_UP_MODE_TRIGGER_WORDS ); sVoiceCmds.put( VoiceConstants.CMD_MAP_NORTH_UP_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_NORTH_UP_MODE_TRIGGER_WORDS ); - //sVoiceCmds.put( VoiceConstants.CMD_MAP_GO_HOME_UN_WAKEUP, VoiceConstants.CMD_MAP_ZOOM_IN_GO_HOME ); - //sVoiceCmds.put( VoiceConstants.CMD_MAP_GO_COMPANY_UN_WAKEUP, VoiceConstants.CMD_MAP_ZOOM_IN_GO_COMPANY ); sVoiceCmds.put( VoiceConstants.CMD_MAP_HISTORY_UN_WAKEUP, VoiceConstants.CMD_MAP_HISTORY_TRIGGER_WORDS ); - //sVoiceCmds.put( VoiceConstants.CMD_MAP_STOP_NAVI_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_STOP_NAVI_MODE_TRIGGER_WORDS ); - //sVoiceCmds.put( VoiceConstants.CMD_MAP_GEO_NEARBY_WAKEUP, VoiceConstants.CMD_MAP_GEO_NEARBY_TRIGGER_WORDS ); sVoiceCmds.put( VoiceConstants.CMD_MAP_SPEAK_DETAIL_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_SPEAK_DETAIL_MODE_TRIGGER_WORDS ); sVoiceCmds.put( VoiceConstants.CMD_MAP_SPEAK_DRAFT_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_SPEAK_DRAFT_MODE_TRIGGER_WORDS ); - //sVoiceCmds.put( VoiceConstants.CMD_MAP_SPEAK_REMAIN_UN_WAKEUP, VoiceConstants.CMD_MAP_SPEAK_REMAIN_TRIGGER_WORDS ); sUnRegisterVoiceCmds.put( VoiceConstants.CMD_MAP_DAY_TIME_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_DAY_TIME_MODE_TRIGGER_WORDS ); sUnRegisterVoiceCmds.put( VoiceConstants.CMD_MAP_NIGHT_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_NIGHT_MODE_TRIGGER_WORDS );