在分享模块增加了,监听高德巡航进行事件上报的功能
TODO 上报接口对接
This commit is contained in:
@@ -83,6 +83,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addBaseModule( new MogoModule( ServiceConst.PATH_REFRESH_STRATEGY, ServiceConst.PATH_REFRESH_STRATEGY ) );
|
||||
MogoModulePaths.addBaseModule( new MogoModule( V2XConst.PATH_V2X_UI, V2XConst.MODULE_NAME ) );
|
||||
MogoModulePaths.addBaseModule( new MogoModule( MogoServicePaths.PATH_STRATEGY_SHARE, "StrategyShare" ) );
|
||||
MogoModulePaths.addBaseModule( new MogoModule( MogoServicePaths.PATH_GAODE_AIMLESS_SHARE, "GaoDeAimlessShare" ) );
|
||||
MogoModulePaths.addBaseModule( new MogoModule( MogoServicePaths.PATH_EVENT_PANEL, "EventPanel" ) );
|
||||
MogoModulePaths.addBaseModule( new MogoModule( MogoServicePaths.PATH_MOGO_MONITOR, "MogoMonitor" ) );
|
||||
MogoModulePaths.addModule( new MogoModule( PushUIConstants.PATH, PushUIConstants.NAME ) );
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.mogo.module.share;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.map.navi.IMogoAimlessModeListener;
|
||||
import com.mogo.map.navi.MogoCongestionInfo;
|
||||
import com.mogo.map.navi.MogoTraffic;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
|
||||
/**
|
||||
* TODO 高德巡航信息监听,并将拥堵信息上报到服务端
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_GAODE_AIMLESS_SHARE)
|
||||
public class GaoDeAimlessProvider implements IProvider {
|
||||
private final String TAG = "GaoDeAimlessProvider";
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
Log.d(TAG, "provider init……");
|
||||
|
||||
// 注册高德巡航回调
|
||||
TanluServiceManager.getIMogoRegisterCenter()
|
||||
.registerMogoAimlessModeListener(TAG, new IMogoAimlessModeListener() {
|
||||
@Override
|
||||
public void onUpdateTraffic2(MogoTraffic traffic) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateCongestion(MogoCongestionInfo info) {
|
||||
// TODO 上报给服务器
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@@ -245,6 +245,12 @@ public class MogoServicePaths {
|
||||
@Deprecated
|
||||
public static final String PATH_STRATEGY_SHARE = "/share/strategy";
|
||||
|
||||
/**
|
||||
* 高德地图巡航上报
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String PATH_GAODE_AIMLESS_SHARE = "/share/gaodeAimless";
|
||||
|
||||
/**
|
||||
* 探路ui
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user