Merge branch 'feature/v1.0.0' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into feature/v1.0.0

This commit is contained in:
wangcongtao
2020-02-11 14:41:32 +08:00
147 changed files with 93643 additions and 34 deletions

View File

@@ -46,6 +46,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener, IMogoOnMessag
private static final String TAG = "MarkerManager";
// 第一次请求到地图的Marker数据
private boolean isFirstMarker = true;
private boolean isOnLineCard = false;
private Context mContext;
private static IMogoMarker lastMarker;
private static MapMarkerManager mMarkerManager;
@@ -81,6 +82,12 @@ public class MapMarkerManager implements IMogoMarkerClickListener, IMogoOnMessag
public void onSwitched(int position, String moduleName) {
Logger.e(TAG, "======moduleName" + moduleName);
highlightedMarker(moduleName);
if (moduleName.equals(ServiceConst.CARD_TYPE_USER_DATA)) {
isOnLineCard = true;
} else {
isOnLineCard = false;
}
}
});
}
@@ -176,7 +183,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener, IMogoOnMessag
// 对指定类型高亮处理
public static void highlightedMarker(String typeTag) {
public synchronized static void highlightedMarker(String typeTag) {
try {
Map<String, List<IMogoMarker>> allMarker = MarkerServiceHandler.getMarkerManager().getAllMarkers();
for (Map.Entry<String, List<IMogoMarker>> entry : allMarker.entrySet()) {
@@ -203,7 +210,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener, IMogoOnMessag
*
* @param marker 要关闭的Marker
*/
public void closeMarkerSelect(IMogoMarker marker) {
public synchronized void closeMarkerSelect(IMogoMarker marker) {
// 将上次选中 Marker 设置为未选中状态
if (marker != null) {
Logger.i(TAG, "closeMarkerSelect 将出Marker详情关闭" + marker);
@@ -223,7 +230,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener, IMogoOnMessag
/**
* 绘制Marker
*/
public void drawMapMarker(MarkerResponse response) {
public synchronized void drawMapMarker(MarkerResponse response) {
lastMarker = null;
JSONArray array = new JSONArray();
@@ -303,7 +310,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener, IMogoOnMessag
try {
// 在ACC on 之后第一次获取到了在线车辆数据选中最近的一个Marker
if (isFirstMarker) {
if (isFirstMarker && isOnLineCard) {
if (nearlyMogoMarker != null) {
// getMogoCardManager().switch2(ServiceConst.CARD_TYPE_USER_DATA);
// MarkerShowEntity markerShowEntity = (MarkerShowEntity) nearlyMogoMarker.getObject();
@@ -401,7 +408,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener, IMogoOnMessag
/**
* 统计埋点
*/
private static void fillNumberTrackEventBody(JSONArray arr, int type, int size) {
private synchronized static void fillNumberTrackEventBody(JSONArray arr, int type, int size) {
JSONObject object = new JSONObject();
try {
object.put("type", type);
@@ -419,7 +426,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener, IMogoOnMessag
*
* @param array 埋点数据
*/
private static void analyticData(JSONArray array) {
private synchronized static void analyticData(JSONArray array) {
try {
if (array == null || array.length() == 0) {
return;
@@ -438,7 +445,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener, IMogoOnMessag
* @param markerShowEntity marker 绘制数据实体
* @return 绘制的Marker
*/
public IMogoMarker drawMapMarker(MarkerShowEntity markerShowEntity) {
public synchronized IMogoMarker drawMapMarker(MarkerShowEntity markerShowEntity) {
//Logger.i(TAG, "绘制Marker====drawMapMarker" + markerShowEntity);
try {
if (markerShowEntity.getMarkerLocation() != null) {

View File

@@ -51,16 +51,16 @@ dependencies {
implementation rootProject.ext.dependencies.mogoutils
implementation rootProject.ext.dependencies.mogocommons
implementation rootProject.ext.dependencies.mogoserviceapi
implementation rootProject.ext.dependencies.modulecommon
implementation rootProject.ext.dependencies.moduleservice
compileOnly rootProject.ext.dependencies.modulecommon
compileOnly rootProject.ext.dependencies.moduleservice
implementation rootProject.ext.dependencies.moduleshare
} else {
implementation project(":libraries:mogo-map")
implementation project(":foudations:mogo-utils")
api project(":foudations:mogo-commons")
implementation project(':services:mogo-service-api')
implementation project(':modules:mogo-module-common')
implementation project(':modules:mogo-module-service')
compileOnly project(':modules:mogo-module-common')
compileOnly project(':modules:mogo-module-service')
implementation project(':modules:mogo-module-share')
}

View File

@@ -71,6 +71,7 @@ import com.mogo.module.tanlu.model.event.MarkerInfo;
import com.mogo.module.tanlu.model.event.PushTypeInfo;
import com.mogo.module.tanlu.model.event.SharedialogEvent;
import com.mogo.module.tanlu.util.Utils;
import com.mogo.module.tanlu.video.FullMediaActivity;
import com.mogo.module.tanlu.video.SimpleCoverVideoPlayer;
import com.mogo.module.tanlu.view.AutoZoomInImageView;
import com.mogo.service.MogoServicePaths;
@@ -195,9 +196,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
// @Override
// public void onClick(View view) {
// Logger.d(TAG, "simpleCoverVideoPlayer onClick -------> ");
// gsyVideoOptionBuilder.setUrl(mVideoUrl).setCacheWithPlay(false).setPlayTag(TAG)
// .build(simpleCoverVideoPlayer);
//// simpleCoverVideoPlayer.getStartButton().performClick();
// FullMediaActivity.Companion.launch(getActivity(), mVideoUrl, mImageUrl, "东城区环球贸易中心", 1300000300);
// }
// });
}
@@ -477,7 +476,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
gsyVideoOptionBuilder.setUrl(mVideoUrl).setCacheWithPlay(false).setPlayTag(TAG)
.build(simpleCoverVideoPlayer);
simpleCoverVideoPlayer.getStartButton().performClick();
traceVideoPlayStatusData("1");
traceVideoPlayStatusData();
}
}
@@ -669,7 +668,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
gsyVideoOptionBuilder.setUrl(videoUrl).setCacheWithPlay(false).setPlayTag(TAG)
.build(simpleCoverVideoPlayer);
simpleCoverVideoPlayer.getStartButton().performClick();
traceVideoPlayStatusData("2");
traceVideoPlayStatusData();
if (mImageUrl == null) {
return;
@@ -678,15 +677,10 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
/**
* 上传播放
* @param type
* type=1 主动触发播放
*
* type=2 自动播放
*/
private void traceVideoPlayStatusData(String type) {
Map<String, Object> properties = new HashMap<>();
properties.put("type", type);
mAnalytics.track(TanluConstants.CARNET_USER_VIDEO_PLAY, properties);
private void traceVideoPlayStatusData() {
mAnalytics.track(TanluConstants.CARNET_USER_VIDEO_PLAY, null);
}

View File

@@ -10,10 +10,10 @@ import java.io.Serializable;
public class MarkerInfo implements Serializable {
public String type; //封路,还是上报
public String imageUrl; //上传完cos图片
public Long lon; //经度
public Long lat; //纬度
public double lon; //经度
public double lat; //纬度
public MarkerInfo(String type, String imageUrl, Long lon, Long lat) {
public MarkerInfo(String type, String imageUrl, double lon, double lat) {
this.type = type;
this.imageUrl = imageUrl;
this.lon = lon;

View File

@@ -15,8 +15,8 @@ class MarkerInfoReceiver : BroadcastReceiver() {
if (intent.action == "com.zhidao.roadcondition.marker.info"){
var type = intent.getStringExtra("type")
var imageUrl = intent.getStringExtra("imageUrl")
var lat = intent.getLongExtra("lat",0)
var lon = intent.getLongExtra("lon",0) //经度
var lat = intent.getDoubleExtra("lat",0.0)
var lon = intent.getDoubleExtra("lon",0.0) //经度
Log.d("MarkerInfoReceiver", "type =" + type + "---->lat =" + lat + "----lon =" + lon + "---imageUrl =" + imageUrl)
EventBus.getDefault().post(MarkerInfo(type, imageUrl,lon, lat))
}

View File

@@ -52,6 +52,7 @@ class SimpleCoverVideoPlayer : StandardGSYVideoPlayer {
totalTime: Int
) {
super.setProgressAndTime(progress, secProgress, currentTime, totalTime)
Log.e("liyz", "setProgressAndTime progress = $progress --->currentTime = $currentTime --->totalTime = $totalTime")
if (progress != 0) {
mProgressBar.progress = progress
}
@@ -125,8 +126,17 @@ class SimpleCoverVideoPlayer : StandardGSYVideoPlayer {
override fun onClick(v: View?) {
super.onClick(v)
}
v?.let {
when (v) {
start -> {
}
else -> {
}
}
}
}
override fun onPrepared() {
super.onPrepared()

View File

@@ -15,7 +15,12 @@
<item android:id="@android:id/progress">
<clip>
<shape>
<solid android:color="#66FFFFFF"/>
<!-- <solid android:color="#66FFFFFF"/>-->
<corners android:radius="5dp" />
<!--在gradient这里设置不同的颜色就会产生渐变的效果-->
<gradient
android:startColor="#1AFFFFFF"
android:endColor="#CCFFFFFF"/>
</shape>
</clip>
</item>

View File

@@ -37,7 +37,6 @@
android:layout_width="match_parent"
android:layout_height="@dimen/tanlu_module_full_bottom_height"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/tanlu_module_full_bottom_margin"
android:orientation="horizontal">

View File

@@ -26,7 +26,7 @@
<dimen name="tanlu_module_card_width">352px</dimen>
<dimen name="tanlu_module_card_margin_left">12px</dimen>
<dimen name="tanlu_module_card_address_margin_top">32px</dimen>
<dimen name="tanlu_module_card_address_margin_top">31px</dimen>
<dimen name="tanlu_module_card_distance_margin_bottom">4px</dimen>
<dimen name="tanlu_module_card_distance_margin_top">1px</dimen>
<dimen name="tanlu_module_card_video_width">327px</dimen>

View File

@@ -27,7 +27,7 @@
<dimen name="tanlu_module_card_width">660px</dimen>
<dimen name="tanlu_module_card_margin_left">24px</dimen>
<dimen name="tanlu_module_card_address_margin_top">58px</dimen>
<dimen name="tanlu_module_card_address_margin_top">56px</dimen>
<dimen name="tanlu_module_card_distance_margin_bottom">8px</dimen>
<dimen name="tanlu_module_card_distance_margin_top">2px</dimen>
<dimen name="tanlu_module_card_video_width">613px</dimen>