flurry / react-native-flurry-sdk

React Native Flurry SDK
Apache License 2.0
45 stars 13 forks source link

Flurry not capturing userId and Location data upto city/state level #32

Closed sidhant1608 closed 3 years ago

sidhant1608 commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

This Bug is About Please choose the closest item by replacing [ ] with [x].

Platform Please choose the platform(s) that you are having the issue by replacing [ ] with [x].

Environment Please tell us the versions of SDKs you are using. If you are not sure about React Native version, you can run react-native --version under your project.

To Reproduce Steps to reproduce the behavior:

  1. Normal Flurry React Native setup.
  2. setting Flurry.setReportLocation(true);
  3. setting Flurry.setUserId(someCustomGeneratedId);

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Are you using Flurry Push/Messaging? Yes / No No (iOS) Are you using CocoaPods for React Native integration? Yes / No Yes

Add any other context about the problem here. I have added all location permissions on Android and have successfully requested and started location watching prior to setting Flurry.setReportLocation(true). I am also not able to see the userIds in the dashboard.

poting-oath commented 3 years ago

@sidhant1608 Is the issue happened on Android or iOS, or on both platforms? Have you tried on the native Android or iOS apps by using the Flurry SDK (not the React Native package), and see the same issue?

sidhant1608 commented 3 years ago

The issue is occuring in both Android and iOS. And no I have not tried on the native apps. I am not aware if I can still use the native SDKs in a react application

sidhant1608 commented 3 years ago

@sidhant1608 Is the issue happened on Android or iOS, or on both platforms? Have you tried on the native Android or iOS apps by using the Flurry SDK (not the React Native package), and see the same issue?

Yes I have since then tried the Native SDK for Android and it did not work. I am using Android SDK 28. This is in my android/app/src/main/AndroidManifest.xml

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-feature android:name="android.permission.ACCESS_FINE_LOCATION" android:required="true"/>

and I am initilizing Flurry in my android/app/src/main/java/com/appName/MainApplication.java

      new FlurryAgent.Builder()
              .withDataSaleOptOut(false) //CCPA - the default value is false
              .withCaptureUncaughtExceptions(true)
              .withIncludeBackgroundSessionsInMetrics(true)
              .withPerformanceMetrics(FlurryPerformance.ALL)
              .build(this, "APPKEY");

Furthermore I am asking for permission using PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION on app start. Yet I am getting only country level data and state/city just says Unknown.

poting-oath commented 3 years ago

@sidhant1608 Thanks for the information! Flurry React Native package is a "wrapper" of the Flurry Analytics SDK. It contains no values (the location, ID, ...) retrieving mechanism inside it. Hence, if you receive some data but not what you expected, then it's because the underneath native SDK returns these values.

Therefore, the problem is why your devices received these data from the native Flurry Analytics SDK.

Now you got "Country" level but no "State/City" level! Looks like you are not even getting the Coarse Location. Therefore, please check your phone and location. Probably your phone's GPS does not work well.

sidhant1608 commented 3 years ago

I have checked my phone and the permissions. I am able to get the location down to precise co-ordinates for both iOS and Android, both in my emulator and real devices. However, I am still not able to see the state/city in Flurry.

poting-oath commented 3 years ago

Looks like your issue is not from the SDK (native), it happened on both iOS and Android. And for sure is not the React Native plugin as well (it's just a wrapper). I think it may be the Flurry UI has some confusion here to show the coarse/fine locations to you.

poting-oath commented 3 years ago

@sidhant1608 How do you find out the Flurry UI does not show what you expected? Could you please describe/explain more? Thanks!

poting-oath commented 3 years ago

Not an issue of the Flurry plugin.

andre-sonect commented 2 years ago

For some reason I am also having this issue but you say it is not from plugin. Then is from Flurry Dashboard UI?