Commit b747efaa by sikang

bugFix

parent 8fa938d2
......@@ -18,6 +18,7 @@ import tech.starwin.LibConfig;
*/
public class TrackEventHelper {
public static final String REST_URL = "rest_url";
public static OnTrackEventListener onTrackEventListener = null;
/**
* click埋点,CONTENT_TYPE = view.getTag()
......@@ -52,6 +53,9 @@ public class TrackEventHelper {
bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, eventName);
//FireBase 埋点
FirebaseAnalytics.getInstance(context).logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);
if (onTrackEventListener != null) {
onTrackEventListener.onActionClick(eventName);
}
}
/**
......@@ -60,6 +64,9 @@ public class TrackEventHelper {
public static void logEvent(String eventName) {
//FireBase 埋点
FirebaseAnalytics.getInstance(LibConfig.getContext()).logEvent(eventName, null);
if (onTrackEventListener != null) {
onTrackEventListener.onActionEvent(eventName);
}
}
......@@ -68,6 +75,13 @@ public class TrackEventHelper {
*/
private static final int CACHE_EXPIRATION_SECONDS = 60 * 5;//remoteConfig 刷新频率
public interface OnTrackEventListener {
void onActionEvent(String eventName);
void onActionClick(String eventName);
}
// public static void fetchRemoteConfig() {
// final FirebaseRemoteConfig config = FirebaseRemoteConfig.getInstance();
// config.fetch(CACHE_EXPIRATION_SECONDS)
......
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