Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android data does not send to Firebase until debug is used #42

Closed
CookieCookson opened this issue Aug 17, 2017 · 5 comments
Closed

Android data does not send to Firebase until debug is used #42

CookieCookson opened this issue Aug 17, 2017 · 5 comments

Comments

@CookieCookson
Copy link

Thanks for the great plugin, @chemerisuk! Everything is working fantastic on iOS, but have a little glitch with how it works on Android.

I can log lots of events, views etc and nothing appears in the Firebase Analytics StreamView (I get "OK" returned in the JS console, and no errors in logcat). If I then do adb shell setprop debug.firebase.analytics.app com.my.app.name, do another analytics command and then switch back with adb shell setprop debug.firebase.analytics.app .none. then all of the non-debug data suddenly appears on the StreamView alongside the debug data on the DebugView.

Without triggering this, the data never gets sent through to the server. I don't really know how to replicate this, I assume this works fine for everyone else from a scratch project?

Only thing I can think of that might be conflicting is the phonegap-plugin-push plugin, which is on 2.0.0. I am using 0.10.1 of cordova-plugin-firebase-analytics.

@qbix0r
Copy link

qbix0r commented Aug 22, 2017

Hi, I'm having exact same issue.
@CookieCookson How did you find out phonegap-plugin-push might cause conflict?

This is a list of plugins in my project, I'm using newest ionic version

        "com-sarriaroman-photoviewer": "~1.1.10",
        "com.wikitude.phonegap.WikitudePlugin": "git+http://github.com/jacobjordan94/wikitude-cordova-plugin",
        "cordova-android": "^6.2.3",
        "cordova-android-support-gradle-release": "~0.0.2",
        "cordova-plugin-background-mode": "~0.7.2",
        "cordova-plugin-badge": "~0.7.4",
        "cordova-plugin-camera": "~2.4.1",
        "cordova-plugin-compat": "~1.1.0",
        "cordova-plugin-console": "~1.0.7",
        "cordova-plugin-device": "~1.1.6",
        "cordova-plugin-dialogs": "~1.3.3",
        "cordova-plugin-facebook4": "~1.9.1",
        "cordova-plugin-file": "~4.3.3",
        "cordova-plugin-file-transfer": "~1.6.3",
        "cordova-plugin-firebase-analytics": "^0.10.1",
        "cordova-plugin-flurryanalytics": "^1.2.1",
        "cordova-plugin-geolocation": "~2.4.3",
        "cordova-plugin-googlemaps": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps.git#12266a62dd4f9fabb9b2d270dcc715a02b8a40ed",
        "cordova-plugin-googleplus": "~5.1.1",
        "cordova-plugin-hockeyapp": "~2.2.4",
        "cordova-plugin-nativestorage": "~2.0.2",
        "cordova-plugin-network-information": "~1.3.3",
        "cordova-plugin-request-location-accuracy": "~2.2.1",
        "cordova-plugin-screen-orientation": "~2.0.1",
        "cordova-plugin-splashscreen": "~4.0.3",
        "cordova-plugin-statusbar": "~2.1.3",
        "cordova-plugin-whitelist": "~1.3.2",
        "cordova-plugin-wkwebview-engine": "git+http://github.com/driftyco/cordova-plugin-wkwebview-engine.git",
        "cordova.plugins.diagnostic": "~3.6.5",
        "de.appplant.cordova.plugin.local-notification": "git+http://github.com/hasandogu/cordova-plugin-local-notifications#ios10",
        "ionic-plugin-keyboard": "~2.2.1"```

@CookieCookson
Copy link
Author

@qbix0r https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#co-existing-with-plugins-that-use-firebase

It states here problems 'may' arise, but I think that was more to do with conflicting library versions, which I have manually resolved by setting the google/firebase libraries to 11.0.1. My project.properties looks like:

target=android-25
android.library.reference.1=CordovaLib
cordova.system.library.1=com.android.support:support-v4:24.1.1+
cordova.system.library.2=com.google.firebase:firebase-core:11.0.1
cordova.gradle.include.1=cordova-plugin-firebase-analytics/development-build.gradle
cordova.system.library.3=com.google.android.gms:play-services-ads:11.0.1
cordova.gradle.include.2=phonegap-plugin-push/development-push.gradle
cordova.system.library.4=com.android.support:support-v13:25.1.0
cordova.system.library.5=me.leolin:ShortcutBadger:1.1.17@aar
cordova.system.library.6=com.google.firebase:firebase-messaging:11.0.1
cordova.gradle.include.3=phonegap-plugin-push/staging-push.gradle

Obviously there could be errors from manually switching out the required library, but as it was changing the patch version from a + to a 1 I didn't see it causing any issues.

Either way, I haven't managed to get to the bottom of this problem yet. Only way to see if it is because of conflicts is to create a blank app with the plugin and test separately.

@freddiescott
Copy link

@CookieCookson Have you found a solution to this one yet, this is now happening for me too.

@CookieCookson
Copy link
Author

@qbix0r @freddiescott It seems the data does make it eventually, but does not send as frequently as the iOS version. After checking my stats on the production version of my app I am getting android data reporting coming through in the reports and it matches up with my user counts etc.

@CookieCookson
Copy link
Author

I'll close this issue for now as I am not certain this is an issue with the plugin as such, but how/when the firebase SDK itself sends its data to the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants