@@ -1,7 +1,5 @@
|
||||
package com.mogo.module.v2x;
|
||||
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
@@ -36,12 +34,6 @@ public class V2XConst {
|
||||
public static final String BROADCAST_SCENE_HANDLER_ACTION = "com.v2x.scene_handler_broadcast";
|
||||
public static final String BROADCAST_SCENE_EXTRA_KEY = "V2XMessageEntity";
|
||||
|
||||
/**
|
||||
* V2X ADASData Action
|
||||
*/
|
||||
public static final String BROADCAST_ADAS_SCENE_HANDLER_ACTION = "com.v2x.adas_data_broadcast";
|
||||
public static final String BROADCAST_ADAS_EXTRA_KEY = "ADASData";
|
||||
|
||||
/**
|
||||
* V2X 测试控制面板广播Action
|
||||
*/
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.mogo.module.v2x.receiver;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
|
||||
/**
|
||||
* 单车预警,车辆盲区预警,弱势交通参与者预警
|
||||
*/
|
||||
public class AdasDataBroadcastReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
try {
|
||||
// ADASRecognizedResult adasResult = (ADASRecognizedResult) intent.getSerializableExtra(V2XConst.BROADCAST_ADAS_EXTRA_KEY);
|
||||
// Logger.d(V2XConst.LOG_NAME_WARN, "AdasDataBroadcastReceiver -->" + GsonUtil.jsonFromObject(adasResult));
|
||||
String adasResult = (String) intent.getSerializableExtra(V2XConst.BROADCAST_ADAS_EXTRA_KEY);
|
||||
Log.d(V2XConst.LOG_NAME_WARN, "AdasDataBroadcastReceiver -----> ");
|
||||
// V2XWaringManager.getInstance().handleAdasData(intent);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,10 @@ package com.mogo.module.v2x.receiver;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.scenario.impl.V2XScenarioManager;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
|
||||
/**
|
||||
* 场景广播接收,道路预警、后台下发、违章停车、故障求助、疲劳驾驶
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.mogo.module.v2x.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||
import com.mogo.module.common.entity.V2XMessageEntity
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity
|
||||
import com.mogo.module.v2x.V2XConst
|
||||
import com.mogo.module.v2x.alarm.V2XEarlyWarningServer
|
||||
|
||||
/**
|
||||
* ugc上报反馈
|
||||
* http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=42321443
|
||||
*/
|
||||
class UgcUploadStatusReceiver : BroadcastReceiver() {
|
||||
private val TAG = "UgcUploadStatusReceiver"
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
if (intent.action == "com.v2x.ugc.upload.status") {
|
||||
val id = intent.getLongExtra("id", 0)
|
||||
val type = intent.getStringExtra("type")
|
||||
val fromType = intent.getStringExtra("fromType")
|
||||
Log.d(V2XConst.MODULE_NAME + "_" + TAG, "后台上传道路事件成功:id=$id type=$type fromType=$fromType")
|
||||
|
||||
/*
|
||||
// 由于目前日活不多,所以先采用直接上传的方式,不进行用户反馈删除,
|
||||
// 先保证用户体验,建议后续还是将分享事件的修改为可以临时存储的方式@李小鹏
|
||||
// 记录新上传的Ugc事件Id
|
||||
V2XEarlyWarningServer.ugcEventId = id
|
||||
// 弹窗
|
||||
val v2xMessageEntity = V2XMessageEntity<V2XRoadEventEntity>()
|
||||
// 控制类型
|
||||
v2xMessageEntity.type = V2XMessageEntity.V2XTypeEnum.ALERT_EVENT_UGC_WARNING
|
||||
// 设置数据
|
||||
v2xMessageEntity.content = V2XEarlyWarningServer.currentUgcRoadEvent
|
||||
// 控制展示状态
|
||||
v2xMessageEntity.isShowState = true
|
||||
|
||||
val intent = Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION)
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2xMessageEntity)
|
||||
LocalBroadcastManager.getInstance(context).sendBroadcast(intent)
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user