Commit cf3f3c0c by 严久程

1、推荐小壹名片的问题

2、flutter埋点
parent 9db6f784
...@@ -75,7 +75,7 @@ public class CustomAttachParser implements MsgAttachmentParser { ...@@ -75,7 +75,7 @@ public class CustomAttachParser implements MsgAttachmentParser {
//订单状态 //订单状态
attachment = new CustomAttachmentOrderStatus(); attachment = new CustomAttachmentOrderStatus();
break; break;
//修改 //修改
case CustomAttachmentType.MODIFY_TIME: case CustomAttachmentType.MODIFY_TIME:
attachment = new CustomAttachModifyTime(); attachment = new CustomAttachModifyTime();
break; break;
...@@ -106,6 +106,7 @@ public class CustomAttachParser implements MsgAttachmentParser { ...@@ -106,6 +106,7 @@ public class CustomAttachParser implements MsgAttachmentParser {
case CustomAttachmentType.TYPE_CUSTOMER_SERVICE: case CustomAttachmentType.TYPE_CUSTOMER_SERVICE:
//客服小壹名片 //客服小壹名片
attachment = new CustomCustomerServiceCardAttachment(); attachment = new CustomCustomerServiceCardAttachment();
break;
case CustomAttachmentType.TYPE_PUSH_SHARE: case CustomAttachmentType.TYPE_PUSH_SHARE:
//分享消息,倾诉推荐,课程,测评,文章 //分享消息,倾诉推荐,课程,测评,文章
attachment = new CustomAttachmentShareMsg(); attachment = new CustomAttachmentShareMsg();
......
package com.channel.ydl_flutter_base.plugin package com.channel.ydl_flutter_base.plugin
import android.content.SharedPreferences
import android.text.TextUtils import android.text.TextUtils
import com.channel.ydl_flutter_base.BuildConfig
import com.channel.ydl_flutter_base.base.BaseFlutterFragment import com.channel.ydl_flutter_base.base.BaseFlutterFragment
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.data.PlatformDataManager import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.modular.ModularServiceManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.SharedPreferencesEditor import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.YdlBuryPointUtil
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
import io.flutter.app.FlutterActivity import io.flutter.app.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodCall import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel import io.flutter.plugin.common.MethodChannel
import io.flutter.view.FlutterView import io.flutter.view.FlutterView
...@@ -37,10 +35,16 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler { ...@@ -37,10 +35,16 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler {
companion object { companion object {
const val CHANNEL: String = "lib/common/channel" const val CHANNEL: String = "lib/common/channel"
const val GETPUBLICPARAMAS: String = "getPublicParamas" 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注册 //activity注册
fun activityRegister(activity: FlutterActivity) { fun activityRegister(activity: FlutterActivity) {
MethodChannel(activity.flutterView, CHANNEL).setMethodCallHandler(YDLCommonPlugin(activity)) MethodChannel(activity.flutterView, CHANNEL).setMethodCallHandler(
YDLCommonPlugin(
activity
)
)
} }
//fragment注册 //fragment注册
...@@ -63,13 +67,28 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler { ...@@ -63,13 +67,28 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler {
mMap["ffrom"] = PlatformDataManager.getRam().getChannelName() mMap["ffrom"] = PlatformDataManager.getRam().getChannelName()
mMap["version"] = RxDeviceTool.getAppVersionName(BaseApp.getApp()) mMap["version"] = RxDeviceTool.getAppVersionName(BaseApp.getApp())
mMap["osBuild"] = mMap["osBuild"] =
RxDeviceTool.getBuildMANUFACTURER() + "," + RxDeviceTool.getBuildBrandModel() + "," + RxDeviceTool.getOsBuileVersion() + "," + RxDeviceTool.getAppVersionName( RxDeviceTool.getBuildMANUFACTURER() + "," + RxDeviceTool.getBuildBrandModel() + "," + RxDeviceTool.getOsBuileVersion() + "," + RxDeviceTool.getAppVersionName(
BaseApp.getApp() BaseApp.getApp()
) )
var res = SharedPreferencesEditor.getString("flutter_proxy_sp_ip") var res = SharedPreferencesEditor.getString("flutter_proxy_sp_ip")
mMap["proxyIp"] = if (TextUtils.isEmpty(res)) "" else res mMap["proxyIp"] = if (TextUtils.isEmpty(res)) "" else res
result.success(mMap) 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