删除了MoGoWarningProvider.kt, 由MoGoHmiFragment接管处理。

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2021-11-08 20:32:04 +08:00
parent 8a693b5d94
commit 2089e2578e
10 changed files with 75 additions and 610 deletions

3
.idea/misc.xml generated
View File

@@ -22,6 +22,7 @@
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_check_status.xml" value="0.18996305418719212" />
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_traffic_light_vr.xml" value="0.18996305418719212" />
<entry key="core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_vip_identification.xml" value="0.45" />
<entry key="foudations/mogo-commons/src/main/res/layout/module_commons_layout_toast.xml" value="0.3117283950617284" />
<entry key="modules/mogo-module-authorize/src/main/res/layout/module_authorize_fragment.xml" value="0.273046875" />
<entry key="modules/mogo-module-carchatting/src/main/res/drawable/module_carchatting_vr_calling_bg.xml" value="0.231875" />
<entry key="modules/mogo-module-carchatting/src/main/res/drawable/module_carchatting_vr_incoming_bg.xml" value="0.231875" />
@@ -41,7 +42,7 @@
<entry key="modules/mogo-module-extensions/src/main/res/layout/include_debug_panel.xml" value="0.28854166666666664" />
<entry key="modules/mogo-module-extensions/src/main/res/layout/merge_vertical_traffic_light_in_vr.xml" value="0.27447916666666666" />
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_include_seeking_help_notice.xml" value="0.28854166666666664" />
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml" value="0.8699541920928865" />
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance.xml" value="0.3117283950617284" />
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_entrance_no_map.xml" value="0.28854166666666664" />
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_ext_layout_extensions.xml" value="0.28854166666666664" />
<entry key="modules/mogo-module-extensions/src/main/res/layout/module_map_layout_navi_info_panel.xml" value="0.28854166666666664" />

View File

@@ -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<MoGoWarningContract.View?, WaringPresenter?>(),
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<MoGoWarningContract.View?, WaringPresenter?>
* 关闭指定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<MoGoWarningContract.View?, WaringPresenter?>
* 展示云公告顶部弹窗
* @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<MoGoWarningContract.View?, WaringPresenter?>
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<MoGoWarningContract.View?, WaringPresenter?>
override fun onDestroy() {
super.onDestroy()
}
override fun vipIdentification(visible: Boolean) {
flVipIdentificationView.visibility = if (visible) View.VISIBLE else View.GONE
Log.d(TAG, "onDestroy")
}
}

View File

@@ -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)
}
}

View File

@@ -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")
}
}

View File

@@ -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

View File

@@ -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

View File

@@ -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"
}

View File

@@ -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");

View File

@@ -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";
}
}

View File

@@ -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 );