4

I'm trying to setup analytics with firebase on my react native app.

I have tried mutiples solutions from different forum like StackOverflow or Github.
Here's what I put in my code :

import analytics from '@react-native-firebase/analytics';

analytics().logEvent('TEST_EVENT');

And here's the solutions I try :

  • In GoogleService-Info make IS_ANALYTICS_ENABLED become true instead of false

  • Used the following command to see my events in the debug view:

adb shell setprop debug.firebase.analytics.app .none.        //disable
adb shell setprop debug.firebase.analytics.app [app_name]    //enable
  • See the logs with the following commands:
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC
  • And here's my logs :
09-08 18:21:23.401 V/FA      (26224): Connecting to remote service
09-08 18:21:23.456 D/FA      (26224): Connected to remote service
09-08 18:21:23.457 V/FA      (26224): Processing queued up service tasks: 1
09-08 18:21:23.469 V/FA-SVC  ( 3653): Logging event: origin=app,name=TEST_EVENT,params=Bundle[{ga_event_origin(_o)=app, ga_screen_class(_sc)=MainActivity, ga_screen_id(_si)=-8052166940190804487}]
09-08 18:21:23.488 V/FA-SVC  ( 3653): Upload scheduled in approximately ms: 500
09-08 18:21:23.489 V/FA-SVC  ( 3653): Unscheduling upload
09-08 18:21:23.490 V/FA-SVC  ( 3653): Scheduling upload, millis: 500
09-08 18:21:23.492 V/FA-SVC  ( 3653): Background event processing time, ms: 24

(...) " Bunch of informations, i don\'t want this to be too long. " (...)

09-08 18:21:39.578 V/FA      (32176): Connecting to remote service
09-08 18:21:39.610 V/FA      (32176): Connection attempt already in progress
09-08 18:21:39.620 V/FA      (32176): Connection attempt already in progress
09-08 18:21:39.620 D/FA      (32176): Setting app measurement enabled (FE): true
09-08 18:21:39.621 D/FA      (32176): Updating Scion state (FE)
09-08 18:21:39.637 V/FA      (32176): Connection attempt already in progress
09-08 18:21:39.637 D/FA      (32176): Connected to remote service
09-08 18:21:39.637 V/FA      (32176): Processing queued up service tasks: 4
09-08 18:21:39.654 V/FA-SVC  ( 3653): Saving default event parameters, appId, data size: com.google.android.youtube, 2
09-08 18:21:44.657 V/FA      (32176): Inactivity, disconnecting from the service




I'm sure it's not a problem from my phone bc when I run ./adb devices I can see my phone:

List of devices attached
MUN0219130000631        device

Even on the side of Firebase, i got the firebase authentification and real-time database which works very well.

But in debug View console, I am unable to see the logs or even device available.
Firebase screenshot

Thanks in advance for your time !

p.s: It's my first post on StackOverflow, be kind and let me know if i can do it better next time

Alexis Knob
  • 67
  • 1
  • 5

0 Answers0