UI适配
@@ -12,7 +12,7 @@ import com.mogo.module.carchatting.card.CallChatConstant;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.media.MediaConstants;
|
||||
import com.mogo.module.onlinecar.OnLineCarConstants;
|
||||
//import com.mogo.module.onlinecar.OnLineCarConstants;
|
||||
import com.mogo.module.push.PushUIConstants;
|
||||
import com.mogo.module.tanlu.constant.TanluConstants;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
@@ -34,7 +34,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
DebugConfig.setNetMode(BuildConfig.NET_ENV);
|
||||
//运营位卡片,需要默认显示,放在第一个加载
|
||||
MogoModulePaths.addModule(new MogoModule(AdCardConstants.TAG, AdCardConstants.MODULE_NAME));
|
||||
MogoModulePaths.addModule(new MogoModule(OnLineCarConstants.TAG, OnLineCarConstants.MODULE_NAME));
|
||||
//MogoModulePaths.addModule(new MogoModule(OnLineCarConstants.TAG, OnLineCarConstants.MODULE_NAME));
|
||||
MogoModulePaths.addModule(new MogoModule(TanluConstants.TAG, TanluConstants.MODEL_NAME));
|
||||
MogoModulePaths.addModule(new MogoModule(CallChatConstant.PROVIDER, CallChatConstant.MODULE_NAME));
|
||||
MogoModulePaths.addModule(new MogoModule(MediaConstants.TAG, MediaConstants.MODULE_TYPE));
|
||||
|
||||
@@ -302,6 +302,16 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
}
|
||||
}
|
||||
|
||||
@Override protected void onResume() {
|
||||
MapBroadCastHelper.getInstance(this).mapFrount();
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
@Override protected void onPause() {
|
||||
MapBroadCastHelper.getInstance(this).mapBackground();
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if ( mMogoFragmentManager.getStackSize() == 0 ) {
|
||||
|
||||
@@ -47,11 +47,11 @@ public class MapBroadCastHelper {
|
||||
|
||||
|
||||
public void notifyXizhiNavStatus(int status) {
|
||||
//Intent intent =new Intent(ACTION_NAV_SEND);
|
||||
//intent.putExtra("KEY_TYPE", 10019);
|
||||
//intent.putExtra("EXTRA_STATE", status);
|
||||
//intent.putExtra("SOURCE_APP", context.getPackageName());
|
||||
//context.sendBroadcast(intent);
|
||||
Intent intent =new Intent(ACTION_NAV_SEND);
|
||||
intent.putExtra("KEY_TYPE", 10019);
|
||||
intent.putExtra("EXTRA_STATE", status);
|
||||
intent.putExtra("SOURCE_APP", context.getPackageName());
|
||||
context.sendBroadcast(intent);
|
||||
Log.v("MapBroadCastHelper","NavStatus="+status);
|
||||
|
||||
}
|
||||
|
||||
@@ -114,6 +114,7 @@ public class MapPresenter extends Presenter< MapView > implements
|
||||
|
||||
@Override
|
||||
public void onCmdSelected( String cmd ) {
|
||||
Logger.d(TAG,cmd,null);
|
||||
switch ( cmd ) {
|
||||
case VoiceConstants.CMD_MAP_TRAFFIC_MODE_UN_WAKEUP:
|
||||
case VoiceConstants.CMD_MAP_TRAFFIC_MODE:
|
||||
@@ -155,15 +156,15 @@ public class MapPresenter extends Presenter< MapView > implements
|
||||
mView.getUIController().changeMapMode( EnumMapUI.Type_Light );
|
||||
break;
|
||||
|
||||
case VoiceConstants.CMD_MAP_GO_COMPANY_UN_WAKEUP:
|
||||
case VoiceConstants.CMD_MAP_GO_COMPANY:
|
||||
mSearchManager.goCompany();
|
||||
break;
|
||||
|
||||
case VoiceConstants.CMD_MAP_GO_HOME_UN_WAKEUP:
|
||||
case VoiceConstants.CMD_MAP_GO_HOME:
|
||||
mSearchManager.goHome();
|
||||
break;
|
||||
//case VoiceConstants.CMD_MAP_GO_COMPANY_UN_WAKEUP:
|
||||
//case VoiceConstants.CMD_MAP_GO_COMPANY:
|
||||
// mSearchManager.goCompany();
|
||||
// break;
|
||||
//
|
||||
//case VoiceConstants.CMD_MAP_GO_HOME_UN_WAKEUP:
|
||||
//case VoiceConstants.CMD_MAP_GO_HOME:
|
||||
// mSearchManager.goHome();
|
||||
// break;
|
||||
|
||||
case VoiceConstants.CMD_MAP_HISTORY_UN_WAKEUP:
|
||||
case VoiceConstants.CMD_MAP_HISTORY:
|
||||
@@ -208,12 +209,14 @@ public class MapPresenter extends Presenter< MapView > implements
|
||||
// }
|
||||
|
||||
case VoiceConstants.CMD_MAP_SPEAK_DRAFT_MODE:
|
||||
case VoiceConstants.CMD_MAP_SPEAK_DRAFT_MODE_UN_WAKEUP:
|
||||
mSearchManager.speakDraft();
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice("已切换", null);
|
||||
|
||||
break;
|
||||
|
||||
case VoiceConstants.CMD_MAP_SPEAK_DETAIL_MODE:
|
||||
case VoiceConstants.CMD_MAP_SPEAK_DETAIL_MODE_UN_WAKEUP:
|
||||
mSearchManager.speakDetail();
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice("已切换", null);
|
||||
|
||||
|
||||
@@ -21,19 +21,19 @@ 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 = {"我要去公司", "导航去公司", "带我去公司"};
|
||||
///**
|
||||
// * 回家
|
||||
// */
|
||||
//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 = {"我要去公司", "导航去公司", "带我去公司"};
|
||||
|
||||
/**
|
||||
* 导航历史记录
|
||||
@@ -145,7 +145,7 @@ public class VoiceConstants {
|
||||
*/
|
||||
public static final String CMD_MAP_SPEAK_DRAFT_MODE = "com.ileja.traffic.speak.draft";
|
||||
public static final String CMD_MAP_SPEAK_DRAFT_MODE_UN_WAKEUP = "CMD_MAP_SPEAK_DRAFT_MODE_UN_WAKEUP";
|
||||
public static final String[] CMD_MAP_SPEAK_DRAFT_MODE_TRIGGER_WORDS = {"简洁模式"};
|
||||
public static final String[] CMD_MAP_SPEAK_DRAFT_MODE_TRIGGER_WORDS = {"简洁模式","简洁播报"};
|
||||
|
||||
|
||||
/**
|
||||
@@ -153,7 +153,7 @@ public class VoiceConstants {
|
||||
*/
|
||||
public static final String CMD_MAP_SPEAK_DETAIL_MODE = "com.ileja.traffic.speak.detail";
|
||||
public static final String CMD_MAP_SPEAK_DETAIL_MODE_UN_WAKEUP = "CMD_MAP_SPEAK_DETAIL_MODE_UN_WAKEUP";
|
||||
public static final String[] CMD_MAP_SPEAK_DETAIL_MODE_TRIGGER_WORDS = {"详细模式"};
|
||||
public static final String[] CMD_MAP_SPEAK_DETAIL_MODE_TRIGGER_WORDS = {"详细模式","详细播报"};
|
||||
|
||||
/**
|
||||
* 播报当前导航剩余里程和时间
|
||||
@@ -184,8 +184,8 @@ public class VoiceConstants {
|
||||
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_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 );
|
||||
@@ -206,8 +206,8 @@ public class VoiceConstants {
|
||||
sCmds.add( VoiceConstants.CMD_MAP_CONTINUE_NAVI_MODE );
|
||||
sCmds.add( VoiceConstants.CMD_MAP_CAR_UP_MODE );
|
||||
sCmds.add( VoiceConstants.CMD_MAP_NORTH_UP_MODE );
|
||||
sCmds.add( VoiceConstants.CMD_MAP_GO_HOME );
|
||||
sCmds.add( VoiceConstants.CMD_MAP_GO_COMPANY );
|
||||
//sCmds.add( VoiceConstants.CMD_MAP_GO_HOME );
|
||||
//sCmds.add( VoiceConstants.CMD_MAP_GO_COMPANY );
|
||||
sCmds.add( VoiceConstants.CMD_MAP_HISTORY );
|
||||
sCmds.add( VoiceConstants.CMD_MAP_STOP_NAVI_MODE );
|
||||
sCmds.add( VoiceConstants.CMD_MAP_SPEAK_DRAFT_MODE );
|
||||
|
||||
@@ -22,10 +22,10 @@ public class DataConstants {
|
||||
public static final String POI_ID_HOME = "common_address_home";
|
||||
public static final String POI_ID_COMPANY = "common_address_company";
|
||||
|
||||
public static final String CP_AUTHORITY = "com.mogo.module.navi";
|
||||
public static final String CP_AUTHORITY = "com.zhidao.auto.personal.provider";
|
||||
|
||||
// 家的地址
|
||||
public static final Uri CONTENT_HOME_ADDRESS_URI = Uri.parse( "content://com.mogo.module.navi/homeAddress" );
|
||||
public static final Uri CONTENT_HOME_ADDRESS_URI = Uri.parse( "content://com.zhidao.auto.personal.provider/homeAddress" );
|
||||
public static final int HOME_ADDRESS_CODE = TYPE_HOME_ADDRESS;
|
||||
public static final String HOME_ADDRESS_PATH = "homeAddress";
|
||||
public static final String HOME_ADDRESS = "homeAddress";
|
||||
@@ -34,7 +34,7 @@ public class DataConstants {
|
||||
public static final String HOME_ADDRESS_LONGITUDE = "homeAddressLongitude";
|
||||
|
||||
// 公司地址
|
||||
public static final Uri CONTENT_COMPANY_ADDRESS_URI = Uri.parse( "content://com.mogo.module.navi/companyAddress" );
|
||||
public static final Uri CONTENT_COMPANY_ADDRESS_URI = Uri.parse( "content://com.zhidao.auto.personal.provider/companyAddress" );
|
||||
public static final int COMPANY_ADDRESS_CODE = TYPE_COMPANY_ADDRESS;
|
||||
public static final String COMPANY_ADDRESS_PATH = "companyAddress";
|
||||
public static final String COMPANY_ADDRESS = "companyAddress";
|
||||
|
||||
@@ -123,6 +123,7 @@ public class AddressContentProvider extends ContentProvider {
|
||||
}
|
||||
if ( validateLocation( lat, lng ) ) {
|
||||
sp = new SearchPoi( DataConstants.POI_ID_COMPANY, poiName, poiAddress, lat, lng, "", "", "" );
|
||||
sp.setType(code);
|
||||
}
|
||||
}
|
||||
try {
|
||||
@@ -148,6 +149,9 @@ public class AddressContentProvider extends ContentProvider {
|
||||
List<Long> result = AppDataBase.getDatabase( getContext() ).poiDao().insert( poi );
|
||||
if ( result.get( 0 ).intValue() == -1 ) {
|
||||
Log.e( TAG, "insert error. " );
|
||||
}else {
|
||||
Log.e( TAG, "insert success. " );
|
||||
|
||||
}
|
||||
AddressManager.INSTANCE.insert(poi);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.mogo.map.MogoLatLng
|
||||
import com.mogo.module.common.MogoModulePaths
|
||||
import com.mogo.module.navi.constants.SearchServiceHolder
|
||||
import com.mogo.module.navi.ui.search.ChoosePathFragment
|
||||
import com.mogo.utils.logger.Logger
|
||||
|
||||
/**
|
||||
*@author zyz
|
||||
@@ -27,6 +28,7 @@ object NaviManager {
|
||||
val action = intent.action
|
||||
if (TextUtils.equals(action, AUTONAVI_STANDARD_BROADCAST_RECV)) {
|
||||
val key_type = intent.getIntExtra("KEY_TYPE", 0)
|
||||
Logger.d("NaviManager","key_type"+key_type,null)
|
||||
if (key_type == 10038) {
|
||||
val lat = intent.getDoubleExtra("LAT", 0.0)
|
||||
val lon = intent.getDoubleExtra("LON", 0.0)
|
||||
@@ -38,6 +40,8 @@ object NaviManager {
|
||||
SearchServiceHolder.push(
|
||||
newInstance, MogoModulePaths.PATH_FRAGMENT_CHOOSE_PAHT
|
||||
)
|
||||
}else if (key_type == 10021) {
|
||||
SearchServiceHolder.getNavi().stopNavi()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_back.png
Executable file
|
After Width: | Height: | Size: 757 B |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_choose_position2.png
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_navi_company.png
Executable file
|
After Width: | Height: | Size: 358 B |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_navi_gas.png
Executable file
|
After Width: | Height: | Size: 620 B |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_navi_go_company.png
Executable file
|
After Width: | Height: | Size: 358 B |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_navi_go_home.png
Executable file
|
After Width: | Height: | Size: 704 B |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_navi_home.png
Executable file
|
After Width: | Height: | Size: 478 B |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_navi_park.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_navi_position.png
Executable file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_navi_restrant.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_navi_setting.png
Executable file
|
After Width: | Height: | Size: 739 B |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_navi_sound_low.png
Executable file
|
After Width: | Height: | Size: 186 B |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_navi_sound_plus.png
Executable file
|
After Width: | Height: | Size: 274 B |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_navi_tolit.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_navi_wash.png
Executable file
|
After Width: | Height: | Size: 712 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_sound_high.png
Executable file
|
After Width: | Height: | Size: 950 B |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_sound_low.png
Executable file
|
After Width: | Height: | Size: 750 B |