opt
This commit is contained in:
@@ -5,14 +5,11 @@ import android.os.Bundle;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.map.IMogoMap;
|
||||
import com.mogo.map.IMogoUiSettings;
|
||||
import com.mogo.map.MogoMapView;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.voice.IMogoVoiceManager;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -27,8 +24,6 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > implements
|
||||
private MogoMapView mMogoMapView;
|
||||
private IMogoMap mMogoMap;
|
||||
|
||||
private IMogoVoiceManager mMogoVoiceManager;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.module_map_fragment_map;
|
||||
@@ -54,8 +49,6 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > implements
|
||||
mMogoMapView.onCreate( savedInstanceState );
|
||||
}
|
||||
initMapView();
|
||||
mMogoVoiceManager = ( IMogoVoiceManager ) ARouter.getInstance().build( MogoServicePaths.PATH_VOICE_MANAGER ).navigation( getContext() );
|
||||
mMogoVoiceManager.registerIntentListener( VoiceConstants.ACTION_GAODE_SDK_NAVI_RECV, mPresenter );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -121,8 +114,5 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > implements
|
||||
if ( mMogoMapView != null ) {
|
||||
mMogoMapView.onDestroy();
|
||||
}
|
||||
if ( mMogoVoiceManager != null ) {
|
||||
mMogoVoiceManager.unregisterIntentListener( VoiceConstants.ACTION_GAODE_SDK_NAVI_RECV );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.module.map;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -17,6 +16,7 @@ import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.map.IMogoMapService;
|
||||
import com.mogo.service.voice.IMogoVoiceListener;
|
||||
import com.mogo.service.voice.IMogoVoiceManager;
|
||||
import com.mogo.utils.ResourcesHelper;
|
||||
import com.mogo.utils.WindowUtils;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -34,6 +34,7 @@ public class MapPresenter extends Presenter< MapView > implements IMogoVoiceList
|
||||
private static final String TAG = "MapPresenter";
|
||||
|
||||
private IMogoMapService mMogoMapService;
|
||||
private IMogoVoiceManager mMogoVoiceManager;
|
||||
|
||||
public MapPresenter( MapView view ) {
|
||||
super( view );
|
||||
@@ -43,7 +44,9 @@ public class MapPresenter extends Presenter< MapView > implements IMogoVoiceList
|
||||
public void onCreate( @NonNull LifecycleOwner owner ) {
|
||||
super.onCreate( owner );
|
||||
mMogoMapService = ( IMogoMapService ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICES_MAP ).navigation( getContext() );
|
||||
registerUnWakeupCmd();
|
||||
mMogoVoiceManager = ( IMogoVoiceManager ) ARouter.getInstance().build( MogoServicePaths.PATH_VOICE_MANAGER ).navigation( getContext() );
|
||||
|
||||
registerVoiceCmd();
|
||||
|
||||
IMogoNavi mogoNavi = mMogoMapService.getNavi( getContext() );
|
||||
mogoNavi.setCalculatePathDisplayBounds( new Rect(
|
||||
@@ -54,168 +57,89 @@ public class MapPresenter extends Presenter< MapView > implements IMogoVoiceList
|
||||
) );
|
||||
}
|
||||
|
||||
private void registerUnWakeupCmd() {
|
||||
if ( VoiceConstants.sUnWakeupCmds.isEmpty() ) {
|
||||
@Override
|
||||
public void onResume( @NonNull LifecycleOwner owner ) {
|
||||
super.onResume( owner );
|
||||
registerVoiceCmd();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause( @NonNull LifecycleOwner owner ) {
|
||||
super.onPause( owner );
|
||||
unregisterVoiceCmd();
|
||||
}
|
||||
|
||||
private void registerVoiceCmd() {
|
||||
if ( VoiceConstants.sVoiceCmds.isEmpty() ) {
|
||||
Logger.w( TAG, "no unwakeup words" );
|
||||
return;
|
||||
}
|
||||
|
||||
for ( Map.Entry< String, String[] > entry : VoiceConstants.sUnWakeupCmds.entrySet() ) {
|
||||
for ( Map.Entry< String, String[] > entry : VoiceConstants.sVoiceCmds.entrySet() ) {
|
||||
mMogoVoiceManager.registerIntentListener( entry.getKey(), this );
|
||||
AIAssist.getInstance( getContext() ).registerUnWakeupCommand( entry.getKey(), entry.getValue(), this );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onIntentReceived( String action, Intent intent ) {
|
||||
if ( !TextUtils.equals( action, VoiceConstants.ACTION_GAODE_SDK_NAVI_RECV ) ) {
|
||||
private void unregisterVoiceCmd() {
|
||||
if ( VoiceConstants.sVoiceCmds.isEmpty() ) {
|
||||
Logger.w( TAG, "no unwakeup words" );
|
||||
return;
|
||||
}
|
||||
int type = intent.getExtras().getInt( VoiceConstants.EXTRA_KEY_TYPE );
|
||||
Bundle data = intent.getExtras();
|
||||
switch ( type ) {
|
||||
case VoiceConstants.TYPE_START_NAVI:
|
||||
// actions.onStartNavi();
|
||||
break;
|
||||
case VoiceConstants.TYPE_STOP_NAVI:
|
||||
// actions.onStopNavi();
|
||||
break;
|
||||
case VoiceConstants.TYPE_NAVI_GUIDE_INFO:
|
||||
// actions.onSpeakNaviGuideInfo();
|
||||
break;
|
||||
case VoiceConstants.TYPE_MAP_UI_SETTING:
|
||||
final int actionType = data.getInt( VoiceConstants.EXTRA_TYPE, 0 );
|
||||
final int operateAction = data.getInt( VoiceConstants.EXTRA_OPERA, 0 );
|
||||
onMapUISetting( actionType, operateAction );
|
||||
break;
|
||||
case VoiceConstants.TYPE_NAVI_STRATEGY:
|
||||
// actions.onNaviStrategySetting( data.getInt( VoiceConstants.EXTRA_M, 1 ) );
|
||||
break;
|
||||
case VoiceConstants.TYPE_NAVI_OVERVIEW:
|
||||
final int overview = data.getInt( VoiceConstants.EXTRA_IS_SHOW, -1 );
|
||||
// if ( overview == 0 ) {
|
||||
// actions.onNaviOverview();
|
||||
// } else {
|
||||
// actions.onNaviContinue();
|
||||
// }
|
||||
break;
|
||||
case VoiceConstants.TYPE_NAVI_SPEAK:
|
||||
// actions.onNaviSpeak( data.getInt( VoiceConstants.EXTRA_MUTE, 0 ) );
|
||||
break;
|
||||
case VoiceConstants.TYPE_COMMON_ADDRESS_SETTING:
|
||||
// actions.onAddressSetting();
|
||||
break;
|
||||
case VoiceConstants.TYPE_COMMON_ADDRESS_CHANGED:
|
||||
// actions.onAddressUpdate();
|
||||
break;
|
||||
case VoiceConstants.TYPE_NAVI_ADD_POINT:
|
||||
// final int updateType = intent.getIntExtra( "TYPE", -1 );
|
||||
// final String name = intent.getStringExtra( "POINAME" );
|
||||
// final String address = intent.getStringExtra( "ADDRESS" );
|
||||
// final double lat = intent.getDoubleExtra( "LAT", 0.0 );
|
||||
// final double lng = intent.getDoubleExtra( "LON", 0.0 );
|
||||
// actions.onUpdateNaviPoint( updateType, name, address, lat, lng );
|
||||
break;
|
||||
case VoiceConstants.TYPE_SPEAK_NAVI_INFO:
|
||||
// actions.onSpeakPathRetainDistanceInfo();
|
||||
break;
|
||||
case VoiceConstants.TYPE_SPEAK_SPEED_LIMIT_INFO:
|
||||
// actions.onSpeakSpeedLimitInfo();
|
||||
break;
|
||||
|
||||
for ( Map.Entry< String, String[] > entry : VoiceConstants.sVoiceCmds.entrySet() ) {
|
||||
mMogoVoiceManager.unregisterIntentListener( entry.getKey() );
|
||||
AIAssist.getInstance( getContext() ).unregisterUnWakeupCommand( entry.getKey(), this );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param actionType 0 - 实时路况
|
||||
* 1 - 地图缩放
|
||||
* 2 - 视图模式
|
||||
* 3 - 夜间模式
|
||||
* @param action actionType = 0 -> 0 - 开、1 - 关
|
||||
* actionType = 1 -> 0 - 放大地图、1 - 缩小地图
|
||||
* actionType = 2 -> 0 - 切换到2D车头朝上、1 - 切换2D正北模式、2 - 切换3D车头朝上
|
||||
* actionType = 3 -> 0 - 黑夜、1 - 正常、2 - 自动
|
||||
*/
|
||||
public void onMapUISetting( int actionType, int action ) {
|
||||
switch ( actionType ) {
|
||||
case 0:
|
||||
if ( action == 0 ) {
|
||||
mView.getUIController().setTrafficEnabled( true );
|
||||
} else if ( action == 1 ) {
|
||||
mView.getUIController().setTrafficEnabled( false );
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if ( action == 0 ) {
|
||||
mView.getUIController().changeZoom( true );
|
||||
} else if ( action == 1 ) {
|
||||
mView.getUIController().changeZoom( false );
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if ( action == 0 ) {
|
||||
// 车头朝上,2D
|
||||
mView.getUIController().changeMapMode( EnumMapUI.CarUp_2D );
|
||||
} else if ( action == 1 ) {
|
||||
// 北朝上,2D
|
||||
mView.getUIController().changeMapMode( EnumMapUI.NorthUP_2D );
|
||||
} else if ( action == 2 ) {
|
||||
// 车头朝上,3D
|
||||
mView.getUIController().changeMapMode( EnumMapUI.CarUp_3D );
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if ( action == 0 ) {
|
||||
mView.getUIController().changeMapMode( EnumMapUI.Type_Night );
|
||||
} else if ( action == 1 ) {
|
||||
mView.getUIController().changeMapMode( EnumMapUI.Type_Light );
|
||||
} else if ( action == 2 ) {
|
||||
mView.getUIController().changeMapMode( EnumMapUI.Type_AUTO_LIGHT_Night );
|
||||
}
|
||||
break;
|
||||
@Override
|
||||
public void onIntentReceived( String command, Intent intent ) {
|
||||
if ( TextUtils.isEmpty( command ) ) {
|
||||
return;
|
||||
}
|
||||
onCmdSelected( command );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCmdSelected( String cmd ) {
|
||||
switch ( cmd ) {
|
||||
case VoiceConstants.CMD_MAP_TRAFFIC_MODE:
|
||||
onMapUISetting( 0, 0 );
|
||||
mView.getUIController().setTrafficEnabled( true );
|
||||
break;
|
||||
case VoiceConstants.CMD_MAP_UN_TRAFFIC_MODE:
|
||||
onMapUISetting( 0, 1 );
|
||||
mView.getUIController().setTrafficEnabled( false );
|
||||
break;
|
||||
case VoiceConstants.CMD_MAP_ZOOM_IN:
|
||||
onMapUISetting( 1, 0 );
|
||||
mView.getUIController().changeZoom( true );
|
||||
break;
|
||||
case VoiceConstants.CMD_MAP_ZOOM_OUT:
|
||||
onMapUISetting( 1, 1 );
|
||||
mView.getUIController().changeZoom( false );
|
||||
break;
|
||||
case VoiceConstants.CMD_MAP_2D:
|
||||
onMapUISetting( 2, 1 );
|
||||
case VoiceConstants.CMD_MAP_NORTH_UP_MODE:
|
||||
mView.getUIController().changeMapMode( EnumMapUI.NorthUP_2D );
|
||||
break;
|
||||
case VoiceConstants.CMD_MAP_3D:
|
||||
onMapUISetting( 2, 2 );
|
||||
mView.getUIController().changeMapMode( EnumMapUI.CarUp_3D );
|
||||
break;
|
||||
case VoiceConstants.CMD_MAP_LIGHT_MODE:
|
||||
onMapUISetting( 3, 1 );
|
||||
case VoiceConstants.CMD_MAP_DAY_TIME_MODE:
|
||||
mView.getUIController().changeMapMode( EnumMapUI.Type_Light );
|
||||
break;
|
||||
case VoiceConstants.CMD_MAP_NIGHT_MODE:
|
||||
onMapUISetting( 3, 0 );
|
||||
mView.getUIController().changeMapMode( EnumMapUI.Type_Night );
|
||||
break;
|
||||
case VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE:
|
||||
onMapUISetting( 3, 2 );
|
||||
mView.getUIController().changeMapMode( EnumMapUI.Type_AUTO_LIGHT_Night );
|
||||
break;
|
||||
case VoiceConstants.CMD_MAP_DISPLAY_OVERVIEW_MODE:
|
||||
mMogoMapService.getMapUIController().displayOverview();
|
||||
mView.getUIController().displayOverview();
|
||||
break;
|
||||
case VoiceConstants.CMD_MAP_CONTINUE_NAVI_MODE:
|
||||
mMogoMapService.getMapUIController().recoverLockMode();
|
||||
mView.getUIController().recoverLockMode();
|
||||
break;
|
||||
case VoiceConstants.CMD_MAP_CAR_UP_MODE:
|
||||
mMogoMapService.getMapUIController().changeMapMode( EnumMapUI.CarUp_2D );
|
||||
break;
|
||||
case VoiceConstants.CMD_MAP_NORTH_UP_MODE:
|
||||
mMogoMapService.getMapUIController().changeMapMode( EnumMapUI.NorthUP_2D );
|
||||
mView.getUIController().changeMapMode( EnumMapUI.CarUp_2D );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,176 +11,99 @@ import java.util.Map;
|
||||
*/
|
||||
public class VoiceConstants {
|
||||
|
||||
// 同行者Adapter接受action
|
||||
public static final String ACTION_GAODE_SDK_NAVI_RECV = "ACTION_GAODE_SDK_NAVI_RECV";
|
||||
// 同行者Adapter发送action
|
||||
public static final String ACTION_GAODE_SDK_NAVI_SEND = "ACTION_GAODE_SDK_NAVI_SEND";
|
||||
|
||||
public static final String EXTRA_KEY_TYPE = "KEY_TYPE";
|
||||
public static final String EXTRA_TYPE = "EXTRA_TYPE";//操作地图
|
||||
public static final String EXTRA_OPERA = "EXTRA_OPERA";//操作地图
|
||||
public static final String EXTRA_MUTE = "EXTRA_MUTE";
|
||||
public static final String EXTRA_IS_SHOW = "EXTRA_IS_SHOW";//预览全路径还是继续导航
|
||||
public static final String EXTRA_M = "EXTRA_M";// 导航策略:1(避免收费) 3(不走高速) 4(躲避拥堵) 20 (高速优先)
|
||||
|
||||
/**
|
||||
* 直接导航
|
||||
*/
|
||||
public static final int TYPE_START_NAVI = 110009;
|
||||
|
||||
/**
|
||||
* 导航预览or继续导航
|
||||
*/
|
||||
public static final int TYPE_NAVI_OVERVIEW = 110006;
|
||||
|
||||
/**
|
||||
* 地图控制:缩放、路况、车头、2/3D
|
||||
*/
|
||||
public static final int TYPE_MAP_UI_SETTING = 110027;
|
||||
|
||||
/**
|
||||
* 重新计算导航策略
|
||||
*/
|
||||
public static final int TYPE_NAVI_STRATEGY = 110032;
|
||||
|
||||
/**
|
||||
* 提箱前方路线方案
|
||||
* <p>
|
||||
* 未实现
|
||||
*/
|
||||
public static final int TYPE_NAVI_GUIDE_INFO = 120004;
|
||||
|
||||
/**
|
||||
* 播放当前剩余里程和时间
|
||||
* <p>
|
||||
* 未实现
|
||||
*/
|
||||
public static final int TYPE_SPEAK_NAVI_INFO = 120001;
|
||||
|
||||
/**
|
||||
* 播放当前限速信息
|
||||
* <p>
|
||||
* 未实现
|
||||
*/
|
||||
public static final int TYPE_SPEAK_SPEED_LIMIT_INFO = 120002;
|
||||
|
||||
/**
|
||||
* 停止导航,但是不退出地图
|
||||
*/
|
||||
public static final int TYPE_STOP_NAVI = 110010;
|
||||
|
||||
/**
|
||||
* 退出地图应用
|
||||
*/
|
||||
@Deprecated
|
||||
public static final int TYPE_EXIT_NAVI = 120003;
|
||||
|
||||
/**
|
||||
* 插入途经点
|
||||
*/
|
||||
public static final int TYPE_NAVI_ADD_POINT = 210009;
|
||||
|
||||
public static final int TYPE_NAVI_SPEAK = 10011;
|
||||
public static final int TYPE_COMMON_ADDRESS_SETTING = 10007;
|
||||
public static final int TYPE_COMMON_ADDRESS_CHANGED = 10008;
|
||||
public static final int TYPE_NAVI_TO = 110027;
|
||||
|
||||
// 地图免唤醒语音注册
|
||||
/**
|
||||
* 放大地图
|
||||
*/
|
||||
public static final String CMD_MAP_ZOOM_IN = "CMD_MAP_ZOOM_IN";
|
||||
public static final String[] CMD_MAP_ZOOM_IN_WAKE_UP_WORDS = {"放大地图"};
|
||||
public static final String CMD_MAP_ZOOM_IN = "com.ileja.navi.map.enlarge";
|
||||
public static final String[] CMD_MAP_ZOOM_IN_TRIGGER_WORDS = {"放大地图"};
|
||||
|
||||
/**
|
||||
* 缩小地图
|
||||
*/
|
||||
public static final String CMD_MAP_ZOOM_OUT = "CMD_MAP_ZOOM_OUT";
|
||||
public static final String[] CMD_MAP_ZOOM_OUT_WAKE_UP_WORDS = {"缩小地图"};
|
||||
public static final String CMD_MAP_ZOOM_OUT = "com.ileja.navi.map.reduce";
|
||||
public static final String[] CMD_MAP_ZOOM_OUT_TRIGGER_WORDS = {"缩小地图"};
|
||||
|
||||
/**
|
||||
* 2D模式
|
||||
*/
|
||||
public static final String CMD_MAP_2D = "CMD_MAP_2D";
|
||||
public static final String[] CMD_MAP_2D_WAKE_UP_WORDS = {"二地模式"};
|
||||
public static final String CMD_MAP_2D = "com.ileja.navi.mode.2d";
|
||||
public static final String[] CMD_MAP_2D_TRIGGER_WORDS = {"二地模式"};
|
||||
|
||||
/**
|
||||
* 3D模式
|
||||
*/
|
||||
public static final String CMD_MAP_3D = "CMD_MAP_3D";
|
||||
public static final String[] CMD_MAP_3D_WAKE_UP_WORDS = {"三地模式"};
|
||||
public static final String CMD_MAP_3D = "com.ileja.navi.mode.3d";
|
||||
public static final String[] CMD_MAP_3D_TRIGGER_WORDS = {"三地模式"};
|
||||
|
||||
/**
|
||||
* 白天模式
|
||||
*/
|
||||
public static final String CMD_MAP_LIGHT_MODE = "CMD_MAP_LIGHT_MODE";
|
||||
public static final String[] CMD_MAP_LIGHT_MODE_WAKE_UP_WORDS = {"白天模式"};
|
||||
public static final String CMD_MAP_DAY_TIME_MODE = "com.ileja.navi.mode.daytime";
|
||||
public static final String[] CMD_MAP_DAY_TIME_MODE_TRIGGER_WORDS = {"白天模式"};
|
||||
|
||||
/**
|
||||
* 黑夜模式
|
||||
*/
|
||||
public static final String CMD_MAP_NIGHT_MODE = "CMD_MAP_NIGHT_MODE";
|
||||
public static final String[] CMD_MAP_NIGHT_MODE_WAKE_UP_WORDS = {"夜间模式"};
|
||||
public static final String CMD_MAP_NIGHT_MODE = "com.ileja.navi.mode.night";
|
||||
public static final String[] CMD_MAP_NIGHT_MODE_TRIGGER_WORDS = {"夜间模式"};
|
||||
|
||||
/**
|
||||
* 自动模式
|
||||
*/
|
||||
public static final String CMD_MAP_AUTO_LIGHT_NIGHT_MODE = "CMD_MAP_AUTO_LIGHT_NIGHT_MODE";
|
||||
public static final String[] CMD_MAP_AUTO_LIGHT_NIGHT_MODE_WAKE_UP_WORDS = {"自动模式"};
|
||||
public static final String CMD_MAP_AUTO_LIGHT_NIGHT_MODE = "com.ileja.navi.mode.autodaynight";
|
||||
public static final String[] CMD_MAP_AUTO_LIGHT_NIGHT_MODE_TRIGGER_WORDS = {"自动模式"};
|
||||
|
||||
/**
|
||||
* 查看路况
|
||||
*/
|
||||
public static final String CMD_MAP_TRAFFIC_MODE = "CMD_MAP_TRAFFIC_MODE";
|
||||
public static final String[] CMD_MAP_TRAFFIC_MODE_WAKE_UP_WORDS = {"打开路况", "打开实况"};
|
||||
public static final String CMD_MAP_TRAFFIC_MODE = "com.ileja.navi.traffic.open";
|
||||
public static final String[] CMD_MAP_TRAFFIC_MODE_TRIGGER_WORDS = {"打开路况", "打开实况"};
|
||||
/**
|
||||
* 关闭路况
|
||||
*/
|
||||
public static final String CMD_MAP_UN_TRAFFIC_MODE = "CMD_MAP_UN_TRAFFIC_MODE";
|
||||
public static final String[] CMD_MAP_UN_TRAFFIC_MODE_WAKE_UP_WORDS = {"关闭路况","关闭实况"};
|
||||
public static final String CMD_MAP_UN_TRAFFIC_MODE = "com.ileja.navi.traffic.close";
|
||||
public static final String[] CMD_MAP_UN_TRAFFIC_MODE_TRIGGER_WORDS = {"关闭路况", "关闭实况"};
|
||||
|
||||
/**
|
||||
* 导航全览
|
||||
*/
|
||||
public static final String CMD_MAP_DISPLAY_OVERVIEW_MODE = "CMD_MAP_DISPLAY_OVERVIEW_MODE";
|
||||
public static final String[] CMD_MAP_DISPLAY_OVERVIEW_MODE_WAKE_UP_WORDS = {"进入全览", "查看全程"};
|
||||
public static final String CMD_MAP_DISPLAY_OVERVIEW_MODE = "com.ileja.navi.map.full";
|
||||
public static final String[] CMD_MAP_DISPLAY_OVERVIEW_MODE_TRIGGER_WORDS = {"进入全览", "查看全程"};
|
||||
|
||||
/**
|
||||
* 继续导航
|
||||
*/
|
||||
public static final String CMD_MAP_CONTINUE_NAVI_MODE = "CMD_MAP_CONTINUE_NAVI_MODE";
|
||||
public static final String[] CMD_MAP_CONTINUE_NAVI_MODE_MODE_WAKE_UP_WORDS = {"继续导航"};
|
||||
public static final String CMD_MAP_CONTINUE_NAVI_MODE = "com.ileja.navi.route.continue";
|
||||
public static final String[] CMD_MAP_CONTINUE_NAVI_MODE_MODE_TRIGGER_WORDS = {"继续导航"};
|
||||
|
||||
/**
|
||||
* 车头朝上
|
||||
*/
|
||||
public static final String CMD_MAP_CAR_UP_MODE = "CMD_MAP_CAR_UP_MODE";
|
||||
public static final String[] CMD_MAP_CAR_UP_MODE_WAKE_UP_WORDS = {"车头朝上"};
|
||||
public static final String CMD_MAP_CAR_UP_MODE = "com.ileja.navi.mode.car_up";
|
||||
public static final String[] CMD_MAP_CAR_UP_MODE_TRIGGER_WORDS = {"车头朝上"};
|
||||
|
||||
/**
|
||||
* 北朝上
|
||||
*/
|
||||
public static final String CMD_MAP_NORTH_UP_MODE = "CMD_MAP_NORTH_UP_MODE";
|
||||
public static final String[] CMD_MAP_NORTH_UP_MODE_WAKE_UP_WORDS = {"北朝上"};
|
||||
|
||||
public static final Map< String, String[] > sUnWakeupCmds = new HashMap<>();
|
||||
public static final String CMD_MAP_NORTH_UP_MODE = "com.ileja.navi.mode.north_up";
|
||||
public static final String[] CMD_MAP_NORTH_UP_MODE_TRIGGER_WORDS = {"北朝上"};
|
||||
|
||||
public static final Map< String, String[] > sVoiceCmds = new HashMap<>();
|
||||
|
||||
static {
|
||||
sUnWakeupCmds.put( VoiceConstants.CMD_MAP_ZOOM_IN, VoiceConstants.CMD_MAP_ZOOM_IN_WAKE_UP_WORDS );
|
||||
sUnWakeupCmds.put( VoiceConstants.CMD_MAP_ZOOM_OUT, VoiceConstants.CMD_MAP_ZOOM_OUT_WAKE_UP_WORDS );
|
||||
sUnWakeupCmds.put( VoiceConstants.CMD_MAP_2D, VoiceConstants.CMD_MAP_2D_WAKE_UP_WORDS );
|
||||
sUnWakeupCmds.put( VoiceConstants.CMD_MAP_3D, VoiceConstants.CMD_MAP_3D_WAKE_UP_WORDS );
|
||||
sUnWakeupCmds.put( VoiceConstants.CMD_MAP_LIGHT_MODE, VoiceConstants.CMD_MAP_LIGHT_MODE_WAKE_UP_WORDS );
|
||||
sUnWakeupCmds.put( VoiceConstants.CMD_MAP_NIGHT_MODE, VoiceConstants.CMD_MAP_NIGHT_MODE_WAKE_UP_WORDS );
|
||||
sUnWakeupCmds.put( VoiceConstants.CMD_MAP_TRAFFIC_MODE, VoiceConstants.CMD_MAP_TRAFFIC_MODE_WAKE_UP_WORDS );
|
||||
sUnWakeupCmds.put( VoiceConstants.CMD_MAP_UN_TRAFFIC_MODE, VoiceConstants.CMD_MAP_UN_TRAFFIC_MODE_WAKE_UP_WORDS );
|
||||
sUnWakeupCmds.put( VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE, VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE_WAKE_UP_WORDS );
|
||||
sUnWakeupCmds.put( VoiceConstants.CMD_MAP_DISPLAY_OVERVIEW_MODE, VoiceConstants.CMD_MAP_DISPLAY_OVERVIEW_MODE_WAKE_UP_WORDS );
|
||||
sUnWakeupCmds.put( VoiceConstants.CMD_MAP_CONTINUE_NAVI_MODE, VoiceConstants.CMD_MAP_CONTINUE_NAVI_MODE_MODE_WAKE_UP_WORDS );
|
||||
sUnWakeupCmds.put( VoiceConstants.CMD_MAP_CAR_UP_MODE, VoiceConstants.CMD_MAP_CAR_UP_MODE_WAKE_UP_WORDS );
|
||||
sUnWakeupCmds.put( VoiceConstants.CMD_MAP_NORTH_UP_MODE, VoiceConstants.CMD_MAP_NORTH_UP_MODE_WAKE_UP_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_ZOOM_IN, VoiceConstants.CMD_MAP_ZOOM_IN_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_ZOOM_OUT, VoiceConstants.CMD_MAP_ZOOM_OUT_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_2D, VoiceConstants.CMD_MAP_2D_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_3D, VoiceConstants.CMD_MAP_3D_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_DAY_TIME_MODE, VoiceConstants.CMD_MAP_DAY_TIME_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_NIGHT_MODE, VoiceConstants.CMD_MAP_NIGHT_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_TRAFFIC_MODE, VoiceConstants.CMD_MAP_TRAFFIC_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_UN_TRAFFIC_MODE, VoiceConstants.CMD_MAP_UN_TRAFFIC_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE, VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_DISPLAY_OVERVIEW_MODE, VoiceConstants.CMD_MAP_DISPLAY_OVERVIEW_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_CONTINUE_NAVI_MODE, VoiceConstants.CMD_MAP_CONTINUE_NAVI_MODE_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_CAR_UP_MODE, VoiceConstants.CMD_MAP_CAR_UP_MODE_TRIGGER_WORDS );
|
||||
sVoiceCmds.put( VoiceConstants.CMD_MAP_NORTH_UP_MODE, VoiceConstants.CMD_MAP_NORTH_UP_MODE_TRIGGER_WORDS );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user