1
我試圖記錄與火力地堡分析事件和當前的屏幕和我得到在我的logcat此日誌中顯示任何數據:火力地堡Analytics不儀表板
App measurement is starting up, version: 9877
Registered activity lifecycle callback
Checking service availability
Service available
Connecting to remote service
onActivityCreated
Activity resumed, time: 234385086
Connected to remote service
Logging event (FE): _e, Bundle[{_o=auto, _et=9309, _sc=IntroActivity, _si=-6959962515326329023}]
setCurrentScreen cannot be called while no activity active
Logging event (FE): select_content, Bundle[{item_name=main, _o=app, content_type=image, item_id=1}]
,這是我的代碼:
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "1");
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "main");
bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "image");
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);
mFirebaseAnalytics.setCurrentScreen(MainActivity.this,"Main","Home");
但是轉到Firebase控制檯後,沒有來自我的應用程序的數據。爲什麼?
事件在Firebase控制檯中不會顯示幾個小時。 [documentation](https://firebase.google.com/docs/analytics/android/events#view_events_in_the_android_studio_debug_log)表示「_These儀表板在整個一天定期更新」。 –
qbix的回答是正確的。你的代碼看起來正確。但我認爲你應該設置當前的屏幕_before_射擊事件。 – Benoit
謝謝你是對的,但我認爲這是實時的@qbix –