Merge remote-tracking branch 'origin/feature/v1.0.0' into feature/v1.0.0
This commit is contained in:
1
.idea/.name
generated
Normal file
1
.idea/.name
generated
Normal file
@@ -0,0 +1 @@
|
||||
MogoLauncher
|
||||
116
.idea/codeStyles/Project.xml
generated
Normal file
116
.idea/codeStyles/Project.xml
generated
Normal file
@@ -0,0 +1,116 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<codeStyleSettings language="XML">
|
||||
<indentOptions>
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||
</indentOptions>
|
||||
<arrangement>
|
||||
<rules>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>xmlns:android</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>xmlns:.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*:id</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*:name</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>name</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>style</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>ANDROID_ATTRIBUTE_ORDER</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>.*</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
</rules>
|
||||
</arrangement>
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
||||
13
.idea/gradle.xml
generated
Normal file
13
.idea/gradle.xml
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
<option name="testRunner" value="PLATFORM" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.mogo.module.share.constant;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @since 2019-1-19
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class ShareConstants {
|
||||
|
||||
//埋点数据
|
||||
//分享分类
|
||||
public static final String LAUNCHER_SHARE_TYPE = "Launcher_Share_type";
|
||||
//分享/上报按钮点击
|
||||
public static final String LAUNCHER_SHARE_CLICK = "Launcher_Share_Click";
|
||||
//
|
||||
public static final String CARNET_USER_UPLOAD = "CarNet_user_upload";
|
||||
}
|
||||
@@ -11,9 +11,16 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.module.share.R;
|
||||
import com.mogo.module.share.constant.ShareConstants;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.analytics.IMogoAnalytics;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
@@ -27,12 +34,15 @@ public class LaucherShareDialog extends Dialog implements View.OnClickListener {
|
||||
private RelativeLayout mTrafficCheckLayout;
|
||||
private RelativeLayout mRoadClosureLayout;
|
||||
private Context mContext;
|
||||
private IMogoAnalytics mAnalytics;
|
||||
|
||||
|
||||
public LaucherShareDialog(@NonNull Context context) {
|
||||
super(context, R.style.BottomDialog);
|
||||
this.mContext = context;
|
||||
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
|
||||
mAnalytics = (IMogoAnalytics) ARouter.getInstance().build(MogoServicePaths.PATH_UTILS_ANALYTICS).navigation(mContext);
|
||||
|
||||
}
|
||||
|
||||
public LaucherShareDialog(@NonNull Context context, int themeResId) {
|
||||
@@ -68,15 +78,23 @@ public class LaucherShareDialog extends Dialog implements View.OnClickListener {
|
||||
public void onClick(View view) {
|
||||
int id = view.getId();
|
||||
if (id == R.id.btn_block_layout) { //拥堵
|
||||
traceTanluData("1");
|
||||
sendShareReceiver("1");
|
||||
traceTypeData("1");
|
||||
} else if (id == R.id.oil_price_layout) {
|
||||
traceData("1");
|
||||
Intent intent = new Intent();
|
||||
intent.setData(Uri.parse("reshthing://com.zhidao.fresh.things/shareOilPrice"));
|
||||
mContext.startActivity(intent);
|
||||
traceTypeData("2");
|
||||
} else if (id == R.id.traffic_check_layout) { //交通检查
|
||||
traceData("1");
|
||||
sendShareReceiver("2");
|
||||
traceTypeData("3");
|
||||
} else if (id == R.id.road_closure_layout) { //封路
|
||||
traceData("1");
|
||||
sendShareReceiver("3");
|
||||
traceTypeData("4");
|
||||
}
|
||||
|
||||
dismiss();
|
||||
@@ -93,5 +111,34 @@ public class LaucherShareDialog extends Dialog implements View.OnClickListener {
|
||||
mContext.sendBroadcast(intent);
|
||||
}
|
||||
|
||||
/**
|
||||
* type=1 路况
|
||||
* <p>
|
||||
* type=2 油价
|
||||
* <p>
|
||||
* type=3 交通检查
|
||||
* <p>
|
||||
* type=4 封路
|
||||
*
|
||||
* @param type
|
||||
*/
|
||||
private void traceTypeData(String type) {
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("type", type);
|
||||
mAnalytics.track(ShareConstants.LAUNCHER_SHARE_TYPE, properties);
|
||||
}
|
||||
|
||||
private void traceData(String from) {
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("from", from);
|
||||
mAnalytics.track(ShareConstants.LAUNCHER_SHARE_TYPE, properties);
|
||||
}
|
||||
|
||||
private void traceTanluData(String type) {
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("type", type);
|
||||
mAnalytics.track(ShareConstants.CARNET_USER_UPLOAD, properties);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -27,4 +27,15 @@ public class TanluConstants {
|
||||
public static final String SHARE_TRAFFIC_CHECK = "com.zhidao.share.traffic.check";
|
||||
//我要分享
|
||||
public static final String GO_TO_SHARE = "com.zhidao.share";
|
||||
|
||||
|
||||
|
||||
//埋点数据
|
||||
//marker点击
|
||||
public static final String LAUNCHER_ICON_CLICK = "Launcher_Icon_Click";
|
||||
//分享分类
|
||||
public static final String LAUNCHER_SHARE_TYPE = "Launcher_Share_type";
|
||||
//分享/上报按钮点击 from=1 手动点击 from=2 语音打开
|
||||
public static final String LAUNCHER_SHARE_CLICK = "Launcher_Share_Click";
|
||||
public static final String CARNET_USER_UPLOAD = "CarNet_user_upload";
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.entity.MarkerUserInfo;
|
||||
import com.mogo.module.service.receiver.MogoReceiver;
|
||||
import com.mogo.module.share.ShareControl;
|
||||
import com.mogo.module.share.constant.ShareConstants;
|
||||
import com.mogo.module.tanlu.R;
|
||||
import com.mogo.module.tanlu.callback.AlongTheWayCallback;
|
||||
import com.mogo.module.tanlu.callback.RoadLineCallback;
|
||||
@@ -76,6 +77,7 @@ 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;
|
||||
import com.mogo.service.analytics.IMogoAnalytics;
|
||||
import com.mogo.service.cardmanager.IMogoCardManager;
|
||||
import com.mogo.service.connection.IMogoSocketManager;
|
||||
import com.mogo.service.imageloader.IMogoImageLoaderListener;
|
||||
@@ -96,7 +98,9 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import static com.mogo.module.tanlu.util.StringUitlKt.formatDate;
|
||||
@@ -131,6 +135,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
private IMogoIntentManager mogoIntentManager; //免唤醒
|
||||
private IMogoMapUIController mMApUIController;
|
||||
private GeocodeSearch mGeocodeSearch;
|
||||
private IMogoAnalytics mAnalytics;
|
||||
|
||||
//声音控制文字
|
||||
private String voiceGetInfoMationTts;
|
||||
@@ -218,6 +223,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
mMApUIController = mMogoMapService.getMapUIController();
|
||||
mGeocodeSearch = new GeocodeSearch(getContext());
|
||||
mMogoStatusManager = (IMogoStatusManager) ARouter.getInstance().build(MogoServicePaths.PATH_STATUS_MANAGER).navigation(getContext());
|
||||
mAnalytics = (IMogoAnalytics) ARouter.getInstance().build(MogoServicePaths.PATH_UTILS_ANALYTICS).navigation(getContext());
|
||||
|
||||
//poi查询
|
||||
mGeocodeSearch.setOnGeocodeSearchListener(new GeocodeSearch.OnGeocodeSearchListener() {
|
||||
@@ -355,6 +361,11 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
mMogoRegisterCenter.registerMogoMarkerClickListener(TanluConstants.MODEL_NAME, new IMogoMarkerClickListener() {
|
||||
@Override
|
||||
public boolean onMarkerClicked(IMogoMarker marker) {
|
||||
//marker 点击
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("type", "2");
|
||||
mAnalytics.track(TanluConstants.LAUNCHER_ICON_CLICK, properties);
|
||||
|
||||
mEmptyLayout.setVisibility(View.GONE);
|
||||
mRootLayout.setVisibility(View.VISIBLE);
|
||||
MarkerExploreWay exploreWay = extractFromMarker(marker);
|
||||
@@ -444,15 +455,20 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else if (intentStr.equals(TanluConstants.UPLOAD_ROAD_CONDITION)) { //上报路况 免唤醒 --ok
|
||||
traceTanluData("2");
|
||||
sendShareReceiver("1");
|
||||
Logger.d(TAG, "mogoIntentListener 上报路况 ----> ");
|
||||
|
||||
traceTypeData("1");
|
||||
} else if (intentStr.equals(TanluConstants.SHARE_ROAD_CLOSURE)) { //分享封路 --ok
|
||||
traceData("2");
|
||||
sendShareReceiver("3");
|
||||
Logger.d(TAG, "mogoIntentListener 分享封路 ----> ");
|
||||
traceTypeData("4");
|
||||
} else if (intentStr.equals(TanluConstants.SHARE_TRAFFIC_CHECK)) { //分享交通检查 --ok
|
||||
traceData("2");
|
||||
sendShareReceiver("2");
|
||||
Logger.d(TAG, "mogoIntentListener 分享交通检查 ----> ");
|
||||
traceTypeData("3");
|
||||
} else if (intentStr.equals(TanluConstants.GO_TO_SHARE)) { //我要分享 --ok
|
||||
ShareControl shareControl = new ShareControl();
|
||||
shareControl.showDialog(getActivity());
|
||||
@@ -461,6 +477,34 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* type=1 路况
|
||||
* <p>
|
||||
* type=2 油价
|
||||
* <p>
|
||||
* type=3 交通检查
|
||||
* <p>
|
||||
* type=4 封路
|
||||
*
|
||||
* @param type
|
||||
*/
|
||||
private void traceTypeData(String type) {
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("type", type);
|
||||
mAnalytics.track(TanluConstants.LAUNCHER_SHARE_TYPE, properties);
|
||||
}
|
||||
|
||||
private void traceData(String from) {
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("from", from);
|
||||
mAnalytics.track(TanluConstants.LAUNCHER_SHARE_CLICK, properties);
|
||||
}
|
||||
|
||||
private void traceTanluData(String type) {
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("type", type);
|
||||
mAnalytics.track(TanluConstants.CARNET_USER_UPLOAD, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* 免唤醒语音监听
|
||||
@@ -849,18 +893,18 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
double lat = TanluServiceHandler.getLocationClient().getLastKnowLocation().getLatitude();
|
||||
double lon = TanluServiceHandler.getLocationClient().getLastKnowLocation().getLongitude();
|
||||
String addressStr = TanluServiceHandler.getLocationClient().getLastKnowLocation().getAddress();
|
||||
|
||||
Log.d(TAG, "uploadShareInfo lat =" + lat + ">>>lon =" + lon + ">>>addressStr =" + addressStr);
|
||||
mTanluModelData.addTrafficCheckInfo(poiType, poiImgUrl, nickname, headImgUrl, lat, lon, addressStr,
|
||||
new UploadShareCallback() {
|
||||
@Override
|
||||
public void onSuccess(BaseData data) {
|
||||
Logger.d(TAG, "uploadShareInfo onSuccess ----->");
|
||||
Log.d(TAG, "uploadShareInfo onSuccess ----->");
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(getString(R.string.tanlu_share_success), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(String message, int code) {
|
||||
Logger.e(TAG, "uploadShareInfo onFail ----->");
|
||||
Log.e(TAG, "uploadShareInfo onFail ----->");
|
||||
AIAssist.getInstance(getContext()).speakTTSVoice(getString(R.string.tanlu_share_failed), null);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -17,8 +17,7 @@ class MarkerInfoReceiver : BroadcastReceiver() {
|
||||
var imageUrl = intent.getStringExtra("imageUrl")
|
||||
var lat = intent.getLongExtra("lat",0)
|
||||
var lon = intent.getLongExtra("lon",0) //经度
|
||||
Log.d("MarkerInfoReceiver", "type = $type ---->lat = $lat ---->lon = $lon + " )
|
||||
Log.d("MarkerInfoReceiver", "")
|
||||
Log.d("MarkerInfoReceiver", "type =" + type + "---->lat =" + lat + "----lon =" + lon + "---imageUrl =" + imageUrl)
|
||||
EventBus.getDefault().post(MarkerInfo(type, imageUrl,lon, lat))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<string name="start_already_agreement">已同意</string>
|
||||
<string name="splash_agreement_bt">探路共享计划 >> </string>
|
||||
<string name="splash_agreement_dialog_title">探路APP用户服务协议</string>
|
||||
<string name="main_empty_content"><Data><![CDATA[<font color="#8F95AA">未找到其他用户分享的路况,<br/>您可以试试</font><font color="#51B0FF">上报路况</font>]]></Data></string>
|
||||
<string name="main_empty_content"><Data><![CDATA[<font color="#8F95AA">未找到其他用户分享的拥堵信息,<br/>您可以试试</font><font color="#51B0FF">分享拥堵</font>]]></Data></string>
|
||||
<string name="main_empty_location">未知区域</string>
|
||||
<string name="custom_send_road_condition">上报路况</string>
|
||||
<string name="text_searching_information">正在更新情报数据</string>
|
||||
|
||||
Reference in New Issue
Block a user