Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # skin/mogo-skin-light/build.gradle
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:sharedUserId="android.uid.system"
|
||||
package="com.mogo.launcher">
|
||||
</manifest>
|
||||
@@ -68,6 +68,11 @@ const val UPLOAD_FROM_STRATEGY_CLOUD_CHECK = "4"
|
||||
*/
|
||||
const val UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO = "5"
|
||||
|
||||
/**
|
||||
* 策略上报集合
|
||||
*/
|
||||
val STRATEGY_UPLOAD_TYPE_ARRAY = arrayOf(UPLOAD_FROM_STRATEGY_BLOCK_AUTO,
|
||||
UPLOAD_FROM_STRATEGY_CLOUD_CHECK, UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO)
|
||||
/**
|
||||
* 默认视频抓取时长,单位是秒
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.mogo.utils.NetworkUtils
|
||||
import com.zhidao.auto.carcorder.callback.TakePhotoCallback
|
||||
import com.zhidao.auto.carcorder.callback.TakeVideoCallback
|
||||
import com.zhidao.auto.carcorder.controller.ZdCarCoderController
|
||||
import com.zhidao.roadcondition.BuildConfig
|
||||
import com.zhidao.roadcondition.constant.*
|
||||
import com.zhidao.roadcondition.event.GetImageSuccessEvent
|
||||
import com.zhidao.roadcondition.event.LatLngStickyEventBus
|
||||
@@ -109,7 +108,7 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
this.mLatitude = latitude
|
||||
if (DebugConfig.getCarMachineType() == 0) { //自研车机
|
||||
outputVideoPath = getCompressVideoPath()
|
||||
CustomStatusHandler.offerVideoStatus(TakeEntity(isCustom, id))
|
||||
CustomStatusHandler.offerVideoStatus(TakeEntity(isCustom, id,fromType))
|
||||
zdCarCoderController.takeVideo(cameraId, duration)
|
||||
trackGetVideo(1)
|
||||
} else { //比亚迪
|
||||
@@ -118,7 +117,7 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
// TipToast.shortTip("分享失败,请检查网络")
|
||||
// } else {
|
||||
//失败了,传空地址,发起请求
|
||||
val entity = TakeEntity(isCustom, id)
|
||||
val entity = TakeEntity(isCustom, id,fromType)
|
||||
videoAndThumbMap["video"] = ""
|
||||
videoAndThumbMap["thumb"] = ""
|
||||
|
||||
@@ -272,6 +271,7 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//获取视频成功
|
||||
override fun onTakeVideoSuccess(camera: Int, videoPath: String?) {
|
||||
var thumbnailPath =
|
||||
@@ -304,6 +304,9 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
|
||||
entity?.let {
|
||||
if (entity.isCustom) {
|
||||
compressVideo(videoPath, thumbnailPath, entity)
|
||||
}else if (entity.fromType in STRATEGY_UPLOAD_TYPE_ARRAY) {
|
||||
// 属于策略上报
|
||||
compressVideo(videoPath, thumbnailPath, entity)
|
||||
} else {
|
||||
Log.d(
|
||||
TAG,
|
||||
|
||||
@@ -27,5 +27,5 @@ object CustomStatusHandler {
|
||||
}
|
||||
|
||||
class TakeEntity(
|
||||
var isCustom: Boolean, var id: Long
|
||||
var isCustom: Boolean, var id: Long, var fromType: String = "0"
|
||||
)
|
||||
@@ -231,11 +231,12 @@ class MainServiceController {
|
||||
latitude: Double,
|
||||
customSend: ((Boolean) -> Unit)? = null
|
||||
) {
|
||||
Log.d(TAG, " sendInformationMessage poiType = $poiType");
|
||||
Log.d(TAG, " sendInformationMessage poiType = $poiType")
|
||||
//删除测试数据
|
||||
var locationInfo = LocationUtil.getInstance().getLocationInfo();
|
||||
var locationInfo = LocationUtil.getInstance().getLocationInfo()
|
||||
if (locationInfo.address.isNullOrEmpty()) {
|
||||
Log.d(TAG, " sendInformationMessage locationInfo.address = $locationInfo.address");
|
||||
Log.d(TAG, " sendInformationMessage locationInfo.address = $locationInfo.address")
|
||||
trackUploadGeo(1)
|
||||
geoLocation(type, url, locationInfo, isCustom,trafficInfoType, isShare, customSend,poiType,mainInfoId,longitude,latitude)
|
||||
} else {
|
||||
postInformationMessage(
|
||||
@@ -271,8 +272,10 @@ class MainServiceController {
|
||||
//转换失败的情况下再重试一次
|
||||
geoRetryed = if (!geoRetryed) {
|
||||
geoLocation(type, url, locationInfo, isCustom, trafficInfoType, isShare, customSend, poiType,mainInfoId,longitude,latitude)
|
||||
|
||||
true
|
||||
} else {
|
||||
|
||||
false
|
||||
}
|
||||
})
|
||||
@@ -311,4 +314,11 @@ class MainServiceController {
|
||||
)
|
||||
}
|
||||
|
||||
//上传
|
||||
private fun trackUploadGeo(type: Int) {
|
||||
trackNormalEvent(
|
||||
CarNet_Geo, mutableMapOf("type" to type)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -33,6 +33,8 @@ const val CarNet_Servers_Upload:String = "CarNet_Servers_Upload" //上传服务
|
||||
const val CarNet_Voice_Search:String = "CarNet_Voice_Search" //语音搜索路况,type=1 成功,type=2 失败
|
||||
const val CarNet_USER_SHOW:String = "CarNet_user_show" //情报展示时长,showtime 加载列表时长
|
||||
const val CarNet_USER_LOAD:String = "CarNet_user_load" //情报加载时长,type=1 视频,2图片
|
||||
const val CarNet_Geo:String = "CarNet_Geo_Location" //上传服务端, type=1开始 ,type=2 成功, type=3 失败
|
||||
|
||||
|
||||
const val CarNet_live_broadcast = "CarNet_live_broadcast" // 地图页面点击直播(在线可直播车机)
|
||||
//自定义埋点
|
||||
|
||||
@@ -183,12 +183,14 @@ class LocationUtil private constructor() {
|
||||
geocoderSearch.setOnGeocodeSearchListener(object : GeocodeSearch.OnGeocodeSearchListener {
|
||||
override fun onRegeocodeSearched(p0: RegeocodeResult?, p1: Int) {
|
||||
if (p1 == 1000) {
|
||||
trackUploadGeo(2);
|
||||
var regeocodeAddress = p0?.regeocodeAddress
|
||||
regeocodeAddress?.let {
|
||||
var locInfo = regeocodeAddress.toLocInfo(regeocodeAddress, latlngPoint)
|
||||
locGeoCode.invoke(locInfo)
|
||||
}
|
||||
} else {
|
||||
trackUploadGeo(3);
|
||||
onError.invoke("geoCode -> $p1")
|
||||
}
|
||||
}
|
||||
@@ -198,6 +200,13 @@ class LocationUtil private constructor() {
|
||||
})
|
||||
}
|
||||
|
||||
//上传
|
||||
private fun trackUploadGeo(type: Int) {
|
||||
trackNormalEvent(
|
||||
CarNet_Geo, mutableMapOf("type" to type)
|
||||
)
|
||||
}
|
||||
|
||||
fun getSpeed():Float{
|
||||
return speed
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
IMogoMapListener,
|
||||
IMogoAimlessModeListener,
|
||||
IMogoStatusChangedListener,
|
||||
IMogoIntentListener{
|
||||
IMogoIntentListener {
|
||||
|
||||
private static final String TAG = "EntranceFragment";
|
||||
|
||||
@@ -192,13 +192,13 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
mStatusManager.setUserInteractionStatus(TAG, true, false);
|
||||
mMApUIController.recoverLockMode();
|
||||
UiThreadHandler.postDelayed( ()->{
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
if (!mStatusManager.isV2XShow()) {
|
||||
mStatusManager.setUserInteractionStatus(TAG, true, false);
|
||||
mMApUIController.setLockZoom(16);
|
||||
mMApUIController.changeZoom(16.0f);
|
||||
}
|
||||
}, 1_000L );
|
||||
}, 1_000L);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -208,7 +208,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
return true;
|
||||
});
|
||||
|
||||
mUploadRoadCondition.setOnLongClickListener(view->{
|
||||
mUploadRoadCondition.setOnLongClickListener(view -> {
|
||||
mApis.getMogoMonitorApi().showLogDebugDialog();
|
||||
return true;
|
||||
});
|
||||
@@ -301,7 +301,8 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
// 埋点
|
||||
final Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("type", 3);
|
||||
ServiceApisManager.serviceApis.getAnalyticsApi().track("Launcher_APP_Icon", properties);
|
||||
ServiceApisManager.serviceApis.getAnalyticsApi().track("Launcher_APP_Icon",
|
||||
properties);
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, e, "打开个人中心Exception");
|
||||
}
|
||||
@@ -309,7 +310,8 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
mUserHeadImg.setVisibility(DebugConfig.isLauncher() ? View.VISIBLE : View.GONE);
|
||||
|
||||
mUploadButtonAnimatorController = new UploadButtonAnimatorController(mUploading, mUpload, mStatusManager);
|
||||
mUploadButtonAnimatorController = new UploadButtonAnimatorController(mUploading, mUpload,
|
||||
mStatusManager);
|
||||
|
||||
debugTopView();
|
||||
}
|
||||
@@ -320,7 +322,8 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
traceData("1");
|
||||
}
|
||||
|
||||
private static final String AUTONAVI_STANDARD_BROADCAST_RECV = "AUTONAVI_STANDARD_BROADCAST_RECV";
|
||||
private static final String AUTONAVI_STANDARD_BROADCAST_RECV =
|
||||
"AUTONAVI_STANDARD_BROADCAST_RECV";
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
@@ -450,17 +453,19 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
return;
|
||||
}
|
||||
|
||||
if (descriptor == StatusDescriptor.UPLOADING) {
|
||||
if (isTrue) {
|
||||
mUploading.setVisibility(View.VISIBLE);
|
||||
mUpload.setVisibility(View.GONE);
|
||||
mUploadButtonAnimatorController.doFrameAnimOnUploadButton();
|
||||
} else {
|
||||
mUploadButtonAnimatorController.stopAnimation();
|
||||
mUploading.setVisibility(View.GONE);
|
||||
mUpload.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else if (descriptor == StatusDescriptor.DISPLAY_OVERVIEW) {
|
||||
// 1.1.5的需求,上报即成功,去掉此处动画
|
||||
// if (descriptor == StatusDescriptor.UPLOADING) {
|
||||
// if (isTrue) {
|
||||
// mUploading.setVisibility(View.VISIBLE);
|
||||
// mUpload.setVisibility(View.GONE);
|
||||
// mUploadButtonAnimatorController.doFrameAnimOnUploadButton();
|
||||
// } else {
|
||||
// mUploadButtonAnimatorController.stopAnimation();
|
||||
// mUploading.setVisibility(View.GONE);
|
||||
// mUpload.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
// } else
|
||||
if (descriptor == StatusDescriptor.DISPLAY_OVERVIEW) {
|
||||
if (!mMogoNavi.isNaviing()) {
|
||||
return;
|
||||
}
|
||||
@@ -585,7 +590,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
});
|
||||
});
|
||||
|
||||
findViewById(R.id.btnDebugAddBottomLayerView).setOnClickListener(v->{
|
||||
findViewById(R.id.btnDebugAddBottomLayerView).setOnClickListener(v -> {
|
||||
TextView tv = new TextView(getContext());
|
||||
tv.setText("entrance add");
|
||||
mApis.getEntranceButtonController().addBottomLayerView(tv, 50, 50);
|
||||
@@ -593,28 +598,30 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapModeChanged( EnumMapUI ui ) {
|
||||
if ( mCameraMode == null ) {
|
||||
public void onMapModeChanged(EnumMapUI ui) {
|
||||
if (mCameraMode == null) {
|
||||
return;
|
||||
}
|
||||
mCameraMode.setSelected(ui == EnumMapUI.NorthUP_2D);
|
||||
mCameraMode.setText(getString(ui == EnumMapUI.NorthUP_2D ? R.string.mode_car_up : R.string.mode_north_up));
|
||||
mCameraMode.setText(getString(ui == EnumMapUI.NorthUP_2D ? R.string.mode_car_up :
|
||||
R.string.mode_north_up));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
if ( mMogoRegisterCenter != null ) {
|
||||
if (mMogoRegisterCenter != null) {
|
||||
mMogoRegisterCenter.unregisterMogoNaviListener(ExtensionsModuleConst.TYPE_ENTRANCE);
|
||||
mMogoRegisterCenter.unregisterMogoMapListener(ExtensionsModuleConst.TYPE_ENTRANCE);
|
||||
mMogoRegisterCenter.unregisterMogoAimlessModeListener(TAG);
|
||||
}
|
||||
if ( mStatusManager != null ) {
|
||||
if (mStatusManager != null) {
|
||||
mStatusManager.unregisterStatusChangedListener(TAG, StatusDescriptor.UPLOADING, this);
|
||||
mStatusManager.unregisterStatusChangedListener(TAG, StatusDescriptor.DISPLAY_OVERVIEW, this);
|
||||
mStatusManager.unregisterStatusChangedListener(TAG, StatusDescriptor.DISPLAY_OVERVIEW
|
||||
, this);
|
||||
}
|
||||
if ( mApis != null ) {
|
||||
if ( mApis.getIntentManagerApi() != null ) {
|
||||
if (mApis != null) {
|
||||
if (mApis.getIntentManagerApi() != null) {
|
||||
mApis.getIntentManagerApi().unregisterIntentListener(AUTONAVI_STANDARD_BROADCAST_RECV, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,11 +43,6 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
// 小智语音,免唤醒词等服务
|
||||
compileOnly rootProject.ext.dependencies.mogomap
|
||||
compileOnly rootProject.ext.dependencies.mogoutils
|
||||
compileOnly rootProject.ext.dependencies.mogocommons
|
||||
compileOnly rootProject.ext.dependencies.mogoserviceapi
|
||||
compileOnly rootProject.ext.dependencies.modulecommon
|
||||
compileOnly rootProject.ext.dependencies.androidxconstraintlayout
|
||||
compileOnly rootProject.ext.dependencies.arouter
|
||||
compileOnly rootProject.ext.dependencies.aiassist
|
||||
@@ -63,8 +58,18 @@ dependencies {
|
||||
|
||||
if( Boolean.valueOf(RELEASE) ){
|
||||
implementation rootProject.ext.dependencies.modulepushbase
|
||||
compileOnly rootProject.ext.dependencies.mogomap
|
||||
compileOnly rootProject.ext.dependencies.mogoutils
|
||||
compileOnly rootProject.ext.dependencies.mogocommons
|
||||
compileOnly rootProject.ext.dependencies.mogoserviceapi
|
||||
compileOnly rootProject.ext.dependencies.modulecommon
|
||||
} else {
|
||||
implementation project(":modules:mogo-module-push-base")
|
||||
compileOnly project(':libraries:mogo-map')
|
||||
compileOnly project(':foudations:mogo-utils')
|
||||
compileOnly project(':foudations:mogo-commons')
|
||||
compileOnly project(':services:mogo-service-api')
|
||||
compileOnly project(':modules:mogo-module-common')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.mogo.map.location.MogoLocation
|
||||
import com.mogo.module.share.ShareControl
|
||||
import com.mogo.module.share.dialog.LaucherShareDialog
|
||||
import com.mogo.service.tanlu.TanluUploadParams
|
||||
import com.mogo.utils.NetworkUtils
|
||||
import com.mogo.utils.TipToast
|
||||
import com.mogo.utils.logger.Logger
|
||||
|
||||
@@ -18,24 +19,30 @@ import com.mogo.utils.logger.Logger
|
||||
object UploadHelper {
|
||||
fun upload(context:Context, type: TanluUploadParams,forcePlayVoice:Boolean = false) {
|
||||
if(ServiceApisManager.serviceApis.statusManagerApi.isUploading){
|
||||
Logger.d("UploadHelper", "正在上报===")
|
||||
TipToast.tip("正在上报,请稍后重试")
|
||||
// 上报即成功,当前还有正在上报的事件,仅做界面展示,不做具体操作
|
||||
ServiceApisManager.serviceApis.tanluUiApi.shareSuccess(type.eventType, type.location)
|
||||
// Logger.d("UploadHelper", "正在上报===")
|
||||
// TipToast.tip("正在上报,请稍后重试")
|
||||
}else {
|
||||
ServiceApisManager.serviceApis.statusManagerApi.setUploadingStatus("CARD_TYPE_ROAD_CONDITION", true)
|
||||
if(DebugConfig.getAIType() == DebugConfig.AI_TYPE_TXZ||forcePlayVoice) {
|
||||
AIAssist.getInstance(context).speakTTSVoice("感谢分享,正在上传")
|
||||
// 判断当前网络状态
|
||||
if(NetworkUtils.isConnected(context)) {
|
||||
// 有网就正常上报
|
||||
ServiceApisManager.serviceApis.statusManagerApi.setUploadingStatus("CARD_TYPE_ROAD_CONDITION", true)
|
||||
// if (DebugConfig.getAIType() == DebugConfig.AI_TYPE_TXZ || forcePlayVoice) {
|
||||
// 因为思必驰语音分享时,语音助手会自己播报一段文字
|
||||
// AIAssist.getInstance(context).speakTTSVoice("感谢分享,正在上传")
|
||||
// }
|
||||
// 上报即成功
|
||||
ServiceApisManager.serviceApis.tanluUiApi.shareSuccess(type.eventType, type.location)
|
||||
val location = ServiceApisManager.serviceApis.mapServiceApi.getSingletonLocationClient(context).lastKnowLocation
|
||||
val latLon = MogoLatLng(location.latitude, location.longitude)
|
||||
type.location = latLon
|
||||
Logger.d("UploadHelper", "upload ----> $type")
|
||||
ServiceApisManager.serviceApis.tanluApi.uploadRoadCondition(type)
|
||||
}else{
|
||||
// 没网就直接提示失败
|
||||
AIAssist.getInstance(context).speakTTSVoice("分享失败,请检查网络")
|
||||
}
|
||||
val location = ServiceApisManager.serviceApis.mapServiceApi.getSingletonLocationClient(context).lastKnowLocation
|
||||
val latLon = MogoLatLng(location.latitude, location.longitude)
|
||||
type.location = latLon
|
||||
Logger.d("UploadHelper", "upload ----> $type")
|
||||
ServiceApisManager.serviceApis.tanluApi.uploadRoadCondition(type)
|
||||
// val intent = Intent()
|
||||
// intent.action = "com.zhidao.share.roadcondition.action"
|
||||
// intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND)
|
||||
// intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES)
|
||||
// intent.putExtra("type", type)
|
||||
// context.sendBroadcast(intent)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tvShareContent"
|
||||
android:text="上报拥堵"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
android:textSize="@dimen/share_module_item"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/shape_bg_222533_20px">
|
||||
android:background="@drawable/module_share_dialog_bg">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_share_title"
|
||||
@@ -23,7 +23,7 @@
|
||||
android:layout_marginTop="@dimen/share_module_title_margin_top"
|
||||
android:gravity="center"
|
||||
android:text="一 我要分享 一"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/module_share_dialog_title_text_color"
|
||||
android:textSize="@dimen/share_module_title_content"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
android:layout_marginTop="@dimen/share_module_tv_margin_top"
|
||||
android:gravity="center"
|
||||
android:text="上报拥堵"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
android:textSize="@dimen/share_module_item"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
@@ -83,7 +83,7 @@
|
||||
android:layout_marginTop="@dimen/share_module_tv_margin_top"
|
||||
android:gravity="center"
|
||||
android:text="分享油价"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
android:textSize="@dimen/share_module_item"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
@@ -109,7 +109,7 @@
|
||||
android:layout_marginTop="@dimen/share_module_tv_margin_top"
|
||||
android:gravity="center"
|
||||
android:text="上报交通检查"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
android:textSize="@dimen/share_module_item"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
@@ -135,7 +135,7 @@
|
||||
android:layout_marginTop="@dimen/share_module_tv_margin_top"
|
||||
android:gravity="center"
|
||||
android:text="上报封路"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
android:textSize="@dimen/share_module_item"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
@@ -148,7 +148,7 @@
|
||||
android:layout_marginTop="@dimen/share_module_bottom_margin_top"
|
||||
android:gravity="center"
|
||||
android:text="可以对小智说:上报拥堵、上报交通检查、上报封路"
|
||||
android:textColor="@color/white_40"
|
||||
android:textColor="@color/module_share_dialog_notice_text_color"
|
||||
android:textSize="@dimen/share_module_bottom_size"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
android:layout_width="@dimen/share_module_width"
|
||||
android:layout_height="@dimen/share_module_height"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/shape_bg_222533_20px"
|
||||
android:background="@drawable/module_share_dialog_bg"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -23,7 +23,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/share_module_title_margin_top"
|
||||
android:text="我要分享"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/module_share_dialog_title_text_color"
|
||||
android:drawableLeft="@drawable/module_share_title_icon_left"
|
||||
android:drawableRight="@drawable/module_share_title_icon_right"
|
||||
android:drawablePadding="@dimen/dp_40"
|
||||
@@ -40,7 +40,7 @@
|
||||
android:drawableTop="@drawable/share_block_up"
|
||||
android:text="拥堵"
|
||||
android:textSize="@dimen/share_module_btn_text_size"
|
||||
android:textColor="#fff"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_share_title"
|
||||
@@ -56,7 +56,7 @@
|
||||
android:drawableTop="@drawable/share_traffic_check"
|
||||
android:text="交通检查"
|
||||
android:textSize="@dimen/share_module_btn_text_size"
|
||||
android:textColor="#fff"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvBlock"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvBlock"
|
||||
@@ -72,7 +72,7 @@
|
||||
app:layout_constraintTop_toTopOf="@+id/tvBlock"
|
||||
app:layout_constraintLeft_toRightOf="@+id/tvTrafficCheck"
|
||||
app:layout_constraintRight_toLeftOf="@+id/tvAccident"
|
||||
android:textColor="#fff"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
android:gravity="center"
|
||||
android:drawablePadding="@dimen/share_module_drawable_padding" />
|
||||
<TextView
|
||||
@@ -85,7 +85,7 @@
|
||||
app:layout_constraintTop_toTopOf="@+id/tvBlock"
|
||||
app:layout_constraintLeft_toRightOf="@+id/tvClosure"
|
||||
app:layout_constraintRight_toLeftOf="@+id/tvConstruction"
|
||||
android:textColor="#fff"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
android:gravity="center"
|
||||
android:drawablePadding="@dimen/share_module_drawable_padding" />
|
||||
<TextView
|
||||
@@ -99,7 +99,7 @@
|
||||
app:layout_constraintLeft_toRightOf="@+id/tvAccident"
|
||||
app:layout_constraintRight_toRightOf="@+id/vBg"
|
||||
android:layout_marginEnd="@dimen/share_module_btn_margin_left_right"
|
||||
android:textColor="#fff"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
android:gravity="center"
|
||||
android:drawablePadding="@dimen/share_module_drawable_padding" />
|
||||
<TextView
|
||||
@@ -109,7 +109,7 @@
|
||||
android:drawableTop="@drawable/share_real_time_traffic"
|
||||
android:text="实时路况"
|
||||
android:textSize="@dimen/share_module_btn_text_size"
|
||||
android:textColor="#fff"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvBlock"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/tvBlock"
|
||||
@@ -122,7 +122,7 @@
|
||||
android:drawableTop="@drawable/share_seek_help"
|
||||
android:text="故障求助"
|
||||
android:textSize="@dimen/share_module_btn_text_size"
|
||||
android:textColor="#fff"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTrafficCheck"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/tvTrafficCheck"
|
||||
@@ -135,7 +135,7 @@
|
||||
android:drawableTop="@drawable/share_stagnant_water"
|
||||
android:text="道路积水"
|
||||
android:textSize="@dimen/share_module_btn_text_size"
|
||||
android:textColor="#fff"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvClosure"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/tvClosure"
|
||||
@@ -148,7 +148,7 @@
|
||||
android:drawableTop="@drawable/share_road_icy"
|
||||
android:text="道路结冰"
|
||||
android:textSize="@dimen/share_module_btn_text_size"
|
||||
android:textColor="#fff"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvAccident"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/tvAccident"
|
||||
android:layout_marginTop="@dimen/share_module_sec_btn_margin_top"
|
||||
@@ -161,7 +161,7 @@
|
||||
android:drawableTop="@drawable/share_dense_fog"
|
||||
android:text="浓雾"
|
||||
android:textSize="@dimen/share_module_btn_text_size"
|
||||
android:textColor="#fff"
|
||||
android:textColor="@color/module_share_dialog_icon_text_color"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvConstruction"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/tvConstruction"
|
||||
android:layout_marginTop="@dimen/share_module_sec_btn_margin_top"
|
||||
|
||||
@@ -1,22 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#000000</color>
|
||||
<color name="colorPrimaryDark">#000000</color>
|
||||
<color name="colorAccent">#1F7FFF</color>
|
||||
|
||||
<color name="red_tips">#FF1B1B</color>
|
||||
<color name="white">#FFFFFF</color>
|
||||
<color name="white_50">#80FFFFFF</color>
|
||||
<color name="white_40">#99FFFFFF</color>
|
||||
<color name="color_F8F8F8">#F8F8F8</color>
|
||||
<color name="color_3">#333333</color>
|
||||
<color name="color_DADAE2">#DADAE2</color>
|
||||
<color name="color_1C1C1C">#1C1C1C</color>
|
||||
<color name="color_545362">#545362</color>
|
||||
<color name="color_191C25">#99191C25</color>
|
||||
<color name="color_666666">#666666</color>
|
||||
<color name="color_999999">#999999</color>
|
||||
<color name="color_000000">#000000</color>
|
||||
<color name="all_transparent_white">#00FFFFFF</color>
|
||||
|
||||
<color name="module_share_dialog_icon_text_color">#fff</color>
|
||||
<color name="module_share_dialog_title_text_color">#fff</color>
|
||||
<color name="module_share_dialog_notice_text_color">#99FFFFFF</color>
|
||||
</resources>
|
||||
|
||||
@@ -8,11 +8,13 @@ import android.view.View;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.location.IMogoLocationListener;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.module.tanlu.callback.DataSetChangedAdapter;
|
||||
import com.mogo.module.tanlu.model.event.MarkerInfo;
|
||||
import com.mogo.service.module.IMogoModuleLifecycle;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.module.ModuleType;
|
||||
@@ -20,6 +22,8 @@ import com.mogo.module.tanlu.constant.TanluConstants;
|
||||
import com.mogo.service.tanlu.IMogoTanluUiProvider;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import io.reactivex.Single;
|
||||
import io.reactivex.SingleEmitter;
|
||||
import io.reactivex.SingleOnSubscribe;
|
||||
@@ -66,4 +70,12 @@ public class TanluCardViewProvider implements IMogoTanluUiProvider {
|
||||
tanluListWindow.realShare(intentStr, intent);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shareSuccess(String poiType, MogoLatLng location) {
|
||||
MarkerInfo markerInfo = new MarkerInfo(poiType, "", location.lon, location.lat, true, "1");
|
||||
EventBus.getDefault().post(markerInfo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,8 @@ class MarkerInfoReceiver : BroadcastReceiver() {
|
||||
var lon = intent.getDoubleExtra("lon",0.0) //经度
|
||||
var custom = intent.getBooleanExtra("custom", false)
|
||||
Log.d("MarkerInfoReceiver", "type =" + type + "---->lat =" + lat + "----lon =" + lon + " --custom = " + custom + "---imageUrl =" + imageUrl)
|
||||
EventBus.getDefault().post(MarkerInfo(type, imageUrl,lon, lat, custom, fromType))
|
||||
// 此处不接收抓取完成的广播,1.1.5的需求是触发即分享成功,所以此处逻辑暂时注释,待日后看情况放开
|
||||
// EventBus.getDefault().post(MarkerInfo(type, imageUrl,lon, lat, custom, fromType))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,6 +270,7 @@ public class V2XModuleProvider implements
|
||||
* 刷新自车求助状态
|
||||
*/
|
||||
private void initCarForHelpStatus() {
|
||||
Logger.d(MODULE_NAME, "刷新自车求助状态……");
|
||||
//本地查询是否超时
|
||||
V2XServiceManager.getV2XRefreshModel().getHelpSignal(new V2XRefreshCallback<V2XSeekHelpRes>() {
|
||||
@Override
|
||||
@@ -277,18 +278,15 @@ public class V2XModuleProvider implements
|
||||
if (result != null) {
|
||||
V2XSeekHelpRes.ResultBean resultBean = result.getResult();
|
||||
if (resultBean != null) {
|
||||
Logger.d(MODULE_NAME, "刷新自车求助状态 resultBean:"+resultBean);
|
||||
int vehicleType = resultBean.getVehicleType();
|
||||
//故障车
|
||||
if (vehicleType == 4) {
|
||||
if (!V2XServiceManager.getMoGoStatusManager().isSeekHelping()) {
|
||||
refreshMeSeekHelp(true);
|
||||
V2XServiceManager.getMoGoStatusManager().setSeekHelping(MODULE_NAME, true);
|
||||
}
|
||||
refreshMeSeekHelp(true);
|
||||
V2XServiceManager.getMoGoStatusManager().setSeekHelping(MODULE_NAME, true);
|
||||
} else {
|
||||
if (V2XServiceManager.getMoGoStatusManager().isSeekHelping()) {
|
||||
refreshMeSeekHelp(false);
|
||||
V2XServiceManager.getMoGoStatusManager().setSeekHelping(MODULE_NAME, false);
|
||||
}
|
||||
refreshMeSeekHelp(false);
|
||||
V2XServiceManager.getMoGoStatusManager().setSeekHelping(MODULE_NAME, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.scenario.impl.AbsV2XScenario;
|
||||
import com.mogo.module.v2x.scenario.scene.seek.V2XSeekHelpButton;
|
||||
import com.mogo.module.v2x.scenario.scene.seek.V2XSeekHelpDialog;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceCallbackListener;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceConstants;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.module.v2x.scenario.scene.seek;
|
||||
package com.mogo.module.v2x.scenario.scene.help;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -66,6 +66,12 @@ public interface IMogoTanluProvider extends IProvider {
|
||||
*/
|
||||
String UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO = "5";
|
||||
|
||||
/**
|
||||
* 策略上报集合
|
||||
*/
|
||||
String[] STRATEGY_UPLOAD_TYPE_ARRAY = new String[]{UPLOAD_FROM_STRATEGY_BLOCK_AUTO,
|
||||
UPLOAD_FROM_STRATEGY_CLOUD_CHECK, UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO};
|
||||
|
||||
/**
|
||||
* 默认视频抓取时长
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.service.tanlu;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
|
||||
/**
|
||||
* 探路相关ui provider
|
||||
@@ -16,4 +17,11 @@ public interface IMogoTanluUiProvider extends IProvider {
|
||||
* @param keywords 同行者-xx堵不堵-中关村
|
||||
*/
|
||||
void searchRoadCondition(String intentStr, String data, String city, String keywords);
|
||||
|
||||
/**
|
||||
* 分享成功,在界面上绘制分享的poi点,只是用于打点,并且这个点无法点击,所以没有特别详细的信息
|
||||
* @param poiType 事件类型
|
||||
* @param location 事件坐标
|
||||
*/
|
||||
void shareSuccess(String poiType, MogoLatLng location);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ android {
|
||||
'src/main/module-back-res',
|
||||
'src/main/module-services-res',
|
||||
'src/main/module-push-res',
|
||||
'src/main/module-share-res',
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="@dimen/dp_30" />
|
||||
<gradient
|
||||
android:angle="-45"
|
||||
android:startColor="#fff"
|
||||
android:endColor="#000" />
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="module_share_dialog_icon_text_color_light">#ccc</color>
|
||||
<color name="module_share_dialog_title_text_color_light">#ccc</color>
|
||||
<color name="module_share_dialog_notice_text_color_light">#99FFFFFF</color>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user