Merge branch 'dev' of http://gitlab.zhidaoauto.com/ecos/yycp-service/Launcher into dev
This commit is contained in:
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -77,6 +77,7 @@
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
<option name="useQualifiedModuleNames" value="true" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -4,7 +4,7 @@
|
||||
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
|
||||
<groovy codeStyle="LEGACY" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -213,8 +213,11 @@ class MainServiceController {
|
||||
}
|
||||
onSuccess {
|
||||
if (it.result != null) {
|
||||
Log.i(TAG, "upload message success id" + it.result.id)
|
||||
sendUgcStatusReceiver(it.result.id, mPoiType, mFromType)
|
||||
Log.i(TAG, "upload success id = " + it.result.id)
|
||||
Log.i(TAG, "upload success mFromType = $mFromType")
|
||||
if (mFromType == "6") {
|
||||
sendUgcStatusReceiver(it.result.id, mPoiType, mFromType)
|
||||
}
|
||||
}
|
||||
|
||||
trackUploadServer(1)
|
||||
@@ -224,7 +227,10 @@ class MainServiceController {
|
||||
onError {
|
||||
Log.i(TAG, "$it upload message ${it.message}")
|
||||
trackUploadServer(2)
|
||||
sendUgcStatusReceiver(0, mPoiType, mFromType)
|
||||
Log.i(TAG, "upload onError mFromType = $mFromType")
|
||||
if (mFromType == "6") {
|
||||
sendUgcStatusReceiver(0, mPoiType, mFromType)
|
||||
}
|
||||
// CosStatusController().videoAndThumbMap.clear()
|
||||
customSend?.invoke(false)
|
||||
}
|
||||
@@ -232,7 +238,7 @@ class MainServiceController {
|
||||
}
|
||||
|
||||
private fun sendUgcStatusReceiver(id: Long, type: String?, fromType: String?) {
|
||||
Log.e(TAG, "sendUgcStatusReceiver ----> id = $id ---type = $type --fromType = $fromType ")
|
||||
Log.d(TAG, "sendUgcStatusReceiver ----> id = $id ---type = $type --fromType = $fromType ")
|
||||
var intent = Intent()
|
||||
intent.action = "com.v2x.ugc.upload.status"
|
||||
intent.putExtra("id", id)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/module_ext_shadow_bkg" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/module_ext_shadow_bkg" android:state_pressed="false" />
|
||||
<item android:drawable="@drawable/module_ext_shadow_bkg" />
|
||||
</selector>
|
||||
@@ -20,7 +20,7 @@
|
||||
android:id="@+id/module_entrance_id_move2_current_location"
|
||||
android:layout_width="@dimen/module_ext_operation_panel_width"
|
||||
android:layout_height="@dimen/module_ext_operation_panel_move2_height"
|
||||
android:background="@drawable/module_ext_shadow_bkg"
|
||||
android:background="@drawable/module_ext_drawable_shadow_bg"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/module_map_ic_move2_current_location"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
@@ -138,7 +138,6 @@
|
||||
<dimen name="module_ext_north_goneMarginTop">142px</dimen>
|
||||
<dimen name="module_ext_button_width">66px</dimen>
|
||||
<dimen name="module_ext_button_height">66px</dimen>
|
||||
<dimen name="module_ext_button_height_small">44px</dimen>
|
||||
<dimen name="module_ext_camera_button_marginTop">10px</dimen>
|
||||
<dimen name="module_ext_display_overview_textSize">12px</dimen>
|
||||
<dimen name="module_ext_display_overview_textSize_large">14px</dimen>
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.navi.MogoCongestionInfo;
|
||||
import com.mogo.map.navi.MogoTraffic;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.common.entity.MarkerResponse;
|
||||
@@ -53,6 +54,7 @@ import com.mogo.module.service.refresh.AutoRefreshStrategy;
|
||||
import com.mogo.module.service.refresh.CustomRefreshStrategy;
|
||||
import com.mogo.module.service.refresh.RefreshObject;
|
||||
import com.mogo.module.service.strategy.CarIconDisplayStrategy;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
import com.mogo.service.cardmanager.IMogoCardManager;
|
||||
import com.mogo.service.connection.IMogoOnMessageListener;
|
||||
@@ -74,6 +76,7 @@ import com.mogo.utils.WorkThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.RequestOptions;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
import com.zhidao.smartv2x.common.utils.LoggerUtils;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
@@ -331,6 +334,7 @@ public class MogoServices implements IMogoMapListener,
|
||||
} else {
|
||||
unregisterInternalUnWakeupWords();
|
||||
stopAutoRefreshStrategy();
|
||||
closeAllPanel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,6 +377,16 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 关闭所有模块的控制面板
|
||||
*/
|
||||
private void closeAllPanel() {
|
||||
LoggerUtils.log("zy=======stop");
|
||||
MogoApisHandler.getInstance().getApis().getShareManager().dismissShareDialog();
|
||||
MogoApisHandler.getInstance().getApis().getOnlineCarPanelApi().hidePanel();
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().closeADAS();
|
||||
}
|
||||
|
||||
public void init( Context context ) {
|
||||
mContext = context;
|
||||
|
||||
|
||||
@@ -62,6 +62,8 @@ public class V2XConst {
|
||||
public static final String V2X_ROAD_EVET = "v2x_road_event";
|
||||
public static final String V2X_ROAD_EVET_HISTORY_BUTTON = "V2X_button_click";
|
||||
public static final String V2X_ROAD_PRODUCE = "v2x_road_produce";
|
||||
public static final String V2X_ASK_ALERT = "v2x_ask_alert";//UGC 提问
|
||||
public static final String V2X_ASK_RESULT = "v2x_ask_result";//UGC 提问回答或消失
|
||||
public static final String LAUNCHER_ICON_CLICK = "Launcher_Icon_Click";
|
||||
/**
|
||||
* V2X 道路事件操作类型
|
||||
|
||||
@@ -99,4 +99,14 @@ public class V2XEventPanelModuleProvider implements
|
||||
public void showPanelWithSelectedItem(int item) {
|
||||
V2XEventPanelFragment.Companion.getInstance().showPanelWithSelectedItem(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showPanel() {
|
||||
V2XEventPanelFragment.Companion.getInstance().showPanel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hidePanel() {
|
||||
V2XEventPanelFragment.Companion.getInstance().hidePanel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,20 +9,26 @@ import android.widget.TextView;
|
||||
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.V2XEventShowEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.alarm.V2XEarlyWarningServer;
|
||||
import com.mogo.module.v2x.scenario.scene.ugc.V2XEventUgcScenario;
|
||||
import com.mogo.module.v2x.utils.EventTypeUtils;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceCallbackListener;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceConstants;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceManager;
|
||||
import com.mogo.service.share.IMogoTanluProvider;
|
||||
import com.mogo.service.share.TanluUploadParams;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
|
||||
|
||||
/**
|
||||
@@ -53,7 +59,6 @@ public class V2XEventUgcVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
private V2XRoadEventEntity mV2XRoadEventEntity;
|
||||
private V2XEventShowEntity mV2XEventShowEntity;
|
||||
|
||||
|
||||
public V2XEventUgcVH(ViewGroup viewGroup) {
|
||||
super(LayoutInflater.from(viewGroup.getContext())
|
||||
.inflate(R.layout.item_v2x_event_ugc, viewGroup, false));
|
||||
@@ -72,28 +77,31 @@ public class V2XEventUgcVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
@Override
|
||||
public void onViewDetachedFromWindow(View v) {
|
||||
//Logger.w(MODULE_NAME, "列表View V2XPushEventDetailVH 触发 onViewDetachedFromWindow");
|
||||
// 反注册语音交互
|
||||
V2XVoiceManager.INSTANCE
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP)
|
||||
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP)
|
||||
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP)
|
||||
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP);
|
||||
unRegisterVoice();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void unRegisterVoice() {
|
||||
// 反注册语音交互
|
||||
V2XVoiceManager.INSTANCE
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP)
|
||||
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP)
|
||||
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP)
|
||||
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP)
|
||||
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView(V2XEventShowEntity v2XEventShowEntity) {
|
||||
try {
|
||||
Log.w(MODULE_NAME + "_" + TAG, "v2XEventShowEntity=" + GsonUtil.jsonFromObject(v2XEventShowEntity));
|
||||
|
||||
if (v2XEventShowEntity == null) {
|
||||
return;
|
||||
}
|
||||
@@ -121,12 +129,18 @@ public class V2XEventUgcVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
}
|
||||
});
|
||||
ivEventTypeIcon.setImageResource((Integer) ugcTitleStr[2]);
|
||||
|
||||
// UGC 问答数据统计
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("content", (String) ugcTitleStr[1]);
|
||||
V2XServiceManager.getMogoAnalytics().track(V2XConst.V2X_ASK_ALERT, properties);
|
||||
}
|
||||
|
||||
|
||||
ivEventReportTrue.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
manualMarkingTrafficJam(1);
|
||||
}
|
||||
});
|
||||
@@ -143,10 +157,36 @@ public class V2XEventUgcVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
}
|
||||
}
|
||||
|
||||
// UGC 提问回答或消失
|
||||
private void dataStatistics(int result) {
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("result", result);
|
||||
V2XServiceManager.getMogoAnalytics().track(V2XConst.V2X_ASK_RESULT, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对道路事件进行反馈
|
||||
*/
|
||||
void manualMarkingTrafficJam(int status) {
|
||||
unRegisterVoice();
|
||||
|
||||
if (status == 1) {
|
||||
// 上报事故
|
||||
TanluUploadParams params =
|
||||
new TanluUploadParams(
|
||||
mNoveltyInfo.getPoiType(),
|
||||
IMogoTanluProvider.UPLOAD_FROM_STRATEGY_UGC,
|
||||
mNoveltyInfo.getInfoIdInt(),
|
||||
new MogoLatLng(mNoveltyInfo.getLocation().getLat(),
|
||||
mNoveltyInfo.getLocation().getLon())
|
||||
);
|
||||
V2XServiceManager.getTanluManager().uploadRoadCondition(params);
|
||||
|
||||
dataStatistics(1);
|
||||
} else if (status == 0) {
|
||||
dataStatistics(2);
|
||||
}
|
||||
|
||||
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("谢谢,您的反馈将帮助更多车友。", null);
|
||||
V2XServiceManager
|
||||
.getV2XRefreshModel()
|
||||
|
||||
@@ -82,18 +82,6 @@ public class V2XEarlyWarningServer {
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2xMessageEntity);
|
||||
LocalBroadcastManager.getInstance(V2XUtils.getApp()).sendBroadcast(intent);
|
||||
|
||||
|
||||
// 上报事故
|
||||
TanluUploadParams params =
|
||||
new TanluUploadParams(
|
||||
v2XRoadEventEntity.getPoiType(),
|
||||
IMogoTanluProvider.UPLOAD_FROM_STRATEGY_UGC,
|
||||
v2XRoadEventEntity.getNoveltyInfo().getInfoIdInt(),
|
||||
new MogoLatLng(v2XRoadEventEntity.getLocation().getLat(),
|
||||
v2XRoadEventEntity.getLocation().getLon())
|
||||
);
|
||||
V2XServiceManager.getTanluManager().uploadRoadCondition(params);
|
||||
|
||||
}
|
||||
// 移出已经预警的事件列表
|
||||
//V2XAlarmServer.mAlertRoadEventList.remove(v2XRoadEventEntity);
|
||||
|
||||
@@ -24,8 +24,8 @@ import com.mogo.module.v2x.view.V2XEventPanelHistoryCountView
|
||||
import com.mogo.module.v2x.voice.V2XVoiceCallbackListener
|
||||
import com.mogo.module.v2x.voice.V2XVoiceConstants
|
||||
import com.mogo.module.v2x.voice.V2XVoiceManager
|
||||
import com.mogo.service.eventpanel.IEventPanelProvider
|
||||
import com.mogo.utils.logger.Logger
|
||||
import com.mogo.utils.storage.SharedPrefsMgr
|
||||
|
||||
|
||||
/**
|
||||
@@ -52,6 +52,7 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
private var mRbScenarioHistory: RadioButton? = null
|
||||
private var mRbSurroundingEvent: RadioButton? = null
|
||||
private var mRbShareEvents: RadioButton? = null
|
||||
private var todayFirstForShared: String? = ""
|
||||
|
||||
private val mV2XScenarioHistoryFragment = V2XScenarioHistoryFragment()
|
||||
private val mV2XShareEventsFragment = V2XShareEventsFragment()
|
||||
|
||||
@@ -11,6 +11,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.module.common.entity.V2XHistoryScenarioData;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.SpacesItemDecoration;
|
||||
@@ -21,6 +22,7 @@ import com.mogo.module.v2x.manager.V2XStatusDescriptor;
|
||||
import com.mogo.module.v2x.presenter.ScenarioHistoryPresenter;
|
||||
import com.mogo.module.v2x.utils.ThreadUtils;
|
||||
import com.mogo.module.v2x.utils.V2XSQLiteUtils;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
import com.mogo.module.v2x.view.V2XListEmptyView;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
@@ -126,10 +128,28 @@ public class V2XScenarioHistoryFragment
|
||||
mClHistoryList.setVisibility(View.GONE);
|
||||
}
|
||||
mV2XScenarioHistoryAdapter.notifyDataSetChanged();
|
||||
ttsForHistoryFirstToday();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* 出行动态 TTS播报
|
||||
* */
|
||||
private void ttsForHistoryFirstToday() {
|
||||
boolean hasBroadTts = V2XUtils.isFirstTodayWithKey("TTS_FOR_HISTORY_SELECTED");
|
||||
if (hasBroadTts == false) {
|
||||
if (mV2XHistoryScenarioData.size() > 0) {
|
||||
AIAssist.getInstance(V2XUtils.getApp()).
|
||||
speakTTSVoice("小智为您记录了今天的出行事件", null);
|
||||
} else {
|
||||
AIAssist.getInstance(V2XUtils.getApp()).
|
||||
speakTTSVoice("小智在这里为您记录今天的出行事件", null);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
@@ -87,7 +87,7 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
ThreadUtils.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
animatioonAction(View.VISIBLE);
|
||||
animationAction(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -144,7 +144,7 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
int shareNum = resultData.getResult().getEnthusiasmIndex().getShareNum();
|
||||
int approveNum = resultData.getResult().getEnthusiasmIndex().getLikeNum();
|
||||
double enthusiasm = resultData.getResult().getEnthusiasmIndex().getEnthusiasmIndex();
|
||||
Log.d(TAG, String.valueOf(enthusiasm)+"TTS播报热心指数个数");
|
||||
Log.d(TAG, String.valueOf(enthusiasm) + "TTS播报热心指数个数");
|
||||
String ttsString = "";
|
||||
if (enthusiasm <= 2) {
|
||||
ttsString = "您目前已完成" + shareNum + "次分享,获得" + approveNum + "次车友认同,热心指数" + enthusiasm
|
||||
@@ -164,7 +164,8 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
* 我的分享列表数据处理
|
||||
* */
|
||||
private void loadSuccessWithShareEventList(Object result) {
|
||||
animatioonAction(View.GONE);
|
||||
|
||||
animationAction(View.GONE);
|
||||
V2XShareEventItem resultData = (V2XShareEventItem) result;
|
||||
V2XShareEventLoadMoreItem item = new V2XShareEventLoadMoreItem();
|
||||
if (resultData != null && resultData.getResult() != null) {
|
||||
@@ -211,7 +212,7 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
|
||||
}
|
||||
|
||||
private void animatioonAction(int visible) {
|
||||
private void animationAction(int visible) {
|
||||
if (visible == View.VISIBLE) {
|
||||
if (loadingView != null) {
|
||||
loadingView.start();
|
||||
@@ -227,13 +228,22 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
@Override
|
||||
protected ShareEventsPresenter createPresenter() {
|
||||
Log.d(TAG, "createPresenter");
|
||||
ttsForSharedFirstToday();
|
||||
return new ShareEventsPresenter(this);
|
||||
}
|
||||
|
||||
private void ttsForSharedFirstToday() {
|
||||
boolean hasBroadTts = V2XUtils.isFirstTodayWithKey("TTS_FOR_SHARED_SELECTED");
|
||||
Log.d(TAG,"shouldBroadTts"+hasBroadTts);
|
||||
if (hasBroadTts == false) {
|
||||
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("您可以在这里查看历史的分享记录", null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadMoreShareEventList() {
|
||||
Log.d(TAG, "page--" + pageNum);
|
||||
animatioonAction(View.VISIBLE);
|
||||
animationAction(View.VISIBLE);
|
||||
pageNum += 1;
|
||||
v2XShareNetworkModel.getShareEventList(pageNum, 10, new V2XRefreshCallback() {
|
||||
@Override
|
||||
|
||||
@@ -25,6 +25,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.anim.OnMarkerAnimationListener;
|
||||
@@ -38,6 +39,7 @@ import com.mogo.module.v2x.adapter.V2XSurroundingAdapter;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingConstruction;
|
||||
import com.mogo.module.v2x.listener.SurroundingItemClickListener;
|
||||
import com.mogo.module.v2x.presenter.SurroundingEventPresenter;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
import com.mogo.module.v2x.view.SurroundingEventView;
|
||||
import com.mogo.module.common.view.NetworkLoadingView;
|
||||
import com.mogo.module.v2x.view.SurroundingMarginDecoration;
|
||||
@@ -189,8 +191,22 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
mRecyclerView.setVisibility(View.GONE);
|
||||
mEmptyLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
ttsForSurroundingFirstToday();
|
||||
}
|
||||
|
||||
/*
|
||||
* 出行动态 TTS播报
|
||||
* */
|
||||
private void ttsForSurroundingFirstToday() {
|
||||
boolean hasBroadTts = V2XUtils.isFirstTodayWithKey("TTS_FOR_SURROUNDING_SELECTED");
|
||||
if (hasBroadTts == false) {
|
||||
if (poiInfosList.size() > 0) {
|
||||
AIAssist.getInstance(V2XUtils.getApp()).
|
||||
speakTTSVoice("发现周边" + poiInfosList.size() + "条交通信息", null);
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, SurroundingConstruction> getPoiTypeMap(List<MarkerExploreWay> list) {
|
||||
Map<String, SurroundingConstruction> mPoiTypeMarkers = new HashMap<>();
|
||||
|
||||
@@ -70,7 +70,7 @@ public class V2XEventUgcWindow extends RelativeLayout
|
||||
}
|
||||
|
||||
public void initView(Context context) {
|
||||
Logger.w(MODULE_NAME, "V2X-初始化疲劳驾驶");
|
||||
Logger.w(MODULE_NAME, "V2X-初始化UGC的Window");
|
||||
LayoutInflater.from(context).inflate(R.layout.window_fault_help, this);
|
||||
// 详情列表
|
||||
mRecyclerView = findViewById(R.id.rvRoadEventList);
|
||||
|
||||
@@ -24,6 +24,7 @@ import androidx.core.content.FileProvider;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.mogo.utils.ThreadPoolService;
|
||||
import com.mogo.utils.storage.SharedPrefsMgr;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
@@ -31,11 +32,15 @@ import java.io.FileReader;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.sql.Time;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
@@ -315,6 +320,21 @@ public class V2XUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 当天第一次
|
||||
* */
|
||||
public static boolean isFirstTodayWithKey(String key) {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd", Locale.US);
|
||||
String formatString = format.format(new Date());
|
||||
String value = SharedPrefsMgr.getInstance(V2XUtils.getApp()).getString(key);
|
||||
if (value.equals(formatString)) {
|
||||
return true;
|
||||
} else {
|
||||
SharedPrefsMgr.getInstance(V2XUtils.getApp()).putString(key, formatString);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// TransActivity
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"lat":39.966668,
|
||||
"lon":116.411211
|
||||
},
|
||||
"poiType":"10006",
|
||||
"poiType":"10003",
|
||||
"type":"CARD_TYPE_ROAD_CONDITION",
|
||||
"uploadType":"2",
|
||||
"userInfo":{
|
||||
@@ -41,5 +41,5 @@
|
||||
"userName":"零下的雨"
|
||||
}
|
||||
},
|
||||
"poiType":"10006"
|
||||
"poiType":"10003"
|
||||
}
|
||||
@@ -14,4 +14,14 @@ public interface IEventPanelProvider extends IMogoModuleProvider {
|
||||
*/
|
||||
void showPanelWithSelectedItem(int item);
|
||||
|
||||
/**
|
||||
* 显示面板,默认选中第一个
|
||||
*/
|
||||
void showPanel();
|
||||
|
||||
/**
|
||||
* 隐藏面板
|
||||
*/
|
||||
void hidePanel();
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 677 B |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/module_ext_shadow_bkg_light" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/module_ext_shadow_bkg_light" android:state_pressed="false" />
|
||||
<item android:drawable="@drawable/module_ext_shadow_bkg_light" />
|
||||
</selector>
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Reference in New Issue
Block a user