Commit cf3f3c0c by 严久程

1、推荐小壹名片的问题

2、flutter埋点
parent 9db6f784
......@@ -75,7 +75,7 @@ public class CustomAttachParser implements MsgAttachmentParser {
//订单状态
attachment = new CustomAttachmentOrderStatus();
break;
//修改
//修改
case CustomAttachmentType.MODIFY_TIME:
attachment = new CustomAttachModifyTime();
break;
......@@ -106,6 +106,7 @@ public class CustomAttachParser implements MsgAttachmentParser {
case CustomAttachmentType.TYPE_CUSTOMER_SERVICE:
//客服小壹名片
attachment = new CustomCustomerServiceCardAttachment();
break;
case CustomAttachmentType.TYPE_PUSH_SHARE:
//分享消息,倾诉推荐,课程,测评,文章
attachment = new CustomAttachmentShareMsg();
......
package com.channel.ydl_flutter_base.plugin
import android.content.SharedPreferences
import android.text.TextUtils
import com.channel.ydl_flutter_base.BuildConfig
import com.channel.ydl_flutter_base.base.BaseFlutterFragment
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.YdlBuryPointUtil
import com.yidianling.common.tools.RxDeviceTool
import io.flutter.app.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.view.FlutterView
......@@ -37,10 +35,16 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler {
companion object {
const val CHANNEL: String = "lib/common/channel"
const val GETPUBLICPARAMAS: String = "getPublicParamas"
const val ACTION_PUSH_EVENT_TRACKING_TAP: String = "action_push_event_tracking_tap"// 点击事件埋点
const val ACTION_PUSH_EVENT_TRACKING_PV: String = "action_push_event_tracking_pv"//pv埋点
//activity注册
fun activityRegister(activity: FlutterActivity) {
MethodChannel(activity.flutterView, CHANNEL).setMethodCallHandler(YDLCommonPlugin(activity))
MethodChannel(activity.flutterView, CHANNEL).setMethodCallHandler(
YDLCommonPlugin(
activity
)
)
}
//fragment注册
......@@ -63,13 +67,28 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler {
mMap["ffrom"] = PlatformDataManager.getRam().getChannelName()
mMap["version"] = RxDeviceTool.getAppVersionName(BaseApp.getApp())
mMap["osBuild"] =
RxDeviceTool.getBuildMANUFACTURER() + "," + RxDeviceTool.getBuildBrandModel() + "," + RxDeviceTool.getOsBuileVersion() + "," + RxDeviceTool.getAppVersionName(
BaseApp.getApp()
)
RxDeviceTool.getBuildMANUFACTURER() + "," + RxDeviceTool.getBuildBrandModel() + "," + RxDeviceTool.getOsBuileVersion() + "," + RxDeviceTool.getAppVersionName(
BaseApp.getApp()
)
var res = SharedPreferencesEditor.getString("flutter_proxy_sp_ip")
mMap["proxyIp"] = if (TextUtils.isEmpty(res)) "" else res
result.success(mMap)
}
ACTION_PUSH_EVENT_TRACKING_TAP -> {
val map = methodCall.arguments as HashMap<*, *>
val clickPath = map["path"] as String
if (!TextUtils.isEmpty(clickPath)) {
YdlBuryPointUtil.sendClick(clickPath)
}
}
ACTION_PUSH_EVENT_TRACKING_PV -> {
val map = methodCall.arguments as HashMap<*, *>
val pvPath = map["path"] as String
if (!TextUtils.isEmpty(pvPath)) {
YdlBuryPointUtil.sendPv(pvPath)
}
}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment