在分享模块增加了,监听高德巡航进行事件上报的功能
TODO 上报接口对接
This commit is contained in:
@@ -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 上报给服务器
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user