分享优化,点击即分享成功
This commit is contained in:
9
.idea/codeStyles/Project.xml
generated
9
.idea/codeStyles/Project.xml
generated
@@ -1,5 +1,14 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<JetCodeStyleSettings>
|
||||
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
||||
<value>
|
||||
<package name="java.util" withSubpackages="false" static="false" />
|
||||
<package name="kotlinx.android.synthetic" withSubpackages="true" static="false" />
|
||||
<package name="io.ktor" withSubpackages="true" static="false" />
|
||||
</value>
|
||||
</option>
|
||||
</JetCodeStyleSettings>
|
||||
<codeStyleSettings language="XML">
|
||||
<indentOptions>
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||
|
||||
@@ -25,10 +25,14 @@ object UploadHelper {
|
||||
// 判断当前网络状态
|
||||
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("感谢分享,正在上传")
|
||||
}
|
||||
// 1.1.5的需求,上报即成功,所以不需要设定下面这个变量
|
||||
// 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
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user