dev
This commit is contained in:
@@ -54,6 +54,7 @@ import com.mogo.module.service.refresh.CustomRefreshStrategy;
|
||||
import com.mogo.module.service.refresh.RefreshObject;
|
||||
import com.mogo.module.service.strategy.CarIconDisplayStrategy;
|
||||
import com.mogo.module.service.websocket.LocationResult;
|
||||
import com.mogo.module.service.websocket.OnePerSecondSendContent;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
import com.mogo.service.adas.entity.ADASRecognizedResult;
|
||||
import com.mogo.service.fragmentmanager.FragmentStackTransactionListener;
|
||||
@@ -428,7 +429,7 @@ public class MogoServices implements IMogoMapListener,
|
||||
|
||||
AutoPilotRemoteController.getInstance().start();
|
||||
|
||||
mThreadHandler.sendEmptyMessageDelayed( ServiceConst.MSG_SEND_CAR_LOCATION_AND_ADAS_RECOGNIZED_RESULT_2_SERVER, 0 );
|
||||
// mThreadHandler.sendEmptyMessageDelayed( ServiceConst.MSG_SEND_CAR_LOCATION_AND_ADAS_RECOGNIZED_RESULT_2_SERVER, 0 );
|
||||
}
|
||||
|
||||
private void initLocationServiceProcess( Context context ) {
|
||||
@@ -445,8 +446,9 @@ public class MogoServices implements IMogoMapListener,
|
||||
|
||||
private void startSendCarLocationAndAdasRecognizedResult2Server() {
|
||||
Location lastCarLocation = mLastCarLocation;
|
||||
LocationResult locationResult = null;
|
||||
if ( lastCarLocation != null ) {
|
||||
LocationResult locationResult = new LocationResult();
|
||||
locationResult = new LocationResult();
|
||||
locationResult.alt = lastCarLocation.getAltitude();
|
||||
locationResult.heading = lastCarLocation.getBearing();
|
||||
locationResult.lat = lastCarLocation.getLatitude();
|
||||
@@ -454,10 +456,15 @@ public class MogoServices implements IMogoMapListener,
|
||||
locationResult.satelliteTime = lastCarLocation.getTime();
|
||||
locationResult.systemTime = System.currentTimeMillis();
|
||||
locationResult.speed = lastCarLocation.getSpeed();
|
||||
locationResult.sn = com.mogo.commons.network.Utils.getSn();
|
||||
locationResult.mortonCode = MortonCode.wrapEncodeMorton( locationResult.lon, locationResult.lat );
|
||||
}
|
||||
List< ADASRecognizedResult > recognizedResults = MarkerServiceHandler.getADASController().getLastADASRecognizedResult();
|
||||
|
||||
OnePerSecondSendContent content = new OnePerSecondSendContent();
|
||||
content.self = locationResult;
|
||||
content.adas = recognizedResults;
|
||||
//todo 通过 websocket 发送内容
|
||||
Logger.d( TAG, GsonUtil.jsonFromObject( content ) );
|
||||
}
|
||||
|
||||
private void initWorkThread() {
|
||||
|
||||
@@ -4,6 +4,8 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.service.MarkerServiceHandler;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.utils.LaunchUtils;
|
||||
import com.mogo.utils.TipToast;
|
||||
@@ -26,6 +28,7 @@ public class AppOperationIntentHandler implements IntentHandler {
|
||||
|
||||
public AppOperationIntentHandler() {
|
||||
sAppPackages.put( "车聊聊", "com.zhidao.imdemo" );
|
||||
sAppPackages.put( "VR模式", "" );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -35,6 +38,12 @@ public class AppOperationIntentHandler implements IntentHandler {
|
||||
String app = object.optString( "object" );
|
||||
String operation = object.optString( "operation" );
|
||||
if ( TextUtils.equals( "打开", operation ) ) {
|
||||
if ( TextUtils.equals( "VR模式", app ) ) {
|
||||
if ( MarkerServiceHandler.getApis().getStatusManagerApi().isMainPageOnResume() ) {
|
||||
MarkerServiceHandler.getApis().getMapFrameControllerApi().changeToVRMode();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ( TextUtils.isEmpty( sAppPackages.get( app ) ) ) {
|
||||
return;
|
||||
}
|
||||
@@ -43,6 +52,13 @@ public class AppOperationIntentHandler implements IntentHandler {
|
||||
} catch ( Exception e ) {
|
||||
TipToast.shortTip( "应用程序未安装" );
|
||||
}
|
||||
} else if ( TextUtils.equals( "关闭", operation ) ) {
|
||||
if ( TextUtils.equals( "VR模式", app ) ) {
|
||||
if ( MarkerServiceHandler.getApis().getStatusManagerApi().isMainPageOnResume() ) {
|
||||
MarkerServiceHandler.getApis().getMapFrameControllerApi().changeTo2dMode();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -35,7 +35,6 @@ import com.mogo.module.service.utils.ViewUtils;
|
||||
import com.mogo.service.adas.IMogoADASControlStatusChangedListener;
|
||||
import com.mogo.service.connection.IMogoOnMessageListener;
|
||||
import com.mogo.service.module.IMogoBizActionDoneListener;
|
||||
import com.mogo.utils.AppUtils;
|
||||
import com.mogo.utils.ResourcesHelper;
|
||||
import com.mogo.utils.ThreadPoolService;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
@@ -216,8 +215,10 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
mogoMarker.setToTop();
|
||||
}
|
||||
}
|
||||
MarkerServiceHandler.getMogoStatusManager().setUserInteractionStatus( TAG, true, false );
|
||||
MarkerServiceHandler.getMapUIController().moveToCenter( mogoMarker.getPosition(), DebugConfig.isRoadEventAnimated() );
|
||||
if ( !MarkerServiceHandler.getApis().getMapFrameControllerApi().isVrMode() ) {
|
||||
MarkerServiceHandler.getMogoStatusManager().setUserInteractionStatus( TAG, true, false );
|
||||
MarkerServiceHandler.getMapUIController().moveToCenter( mogoMarker.getPosition(), DebugConfig.isRoadEventAnimated() );
|
||||
}
|
||||
}
|
||||
|
||||
private void updateCarUserInfoWindow( IMogoMarker marker ) {
|
||||
|
||||
Reference in New Issue
Block a user