What's difference between:
https://ionicframework.com/docs/native/firebase/
and
https://ionicframework.com/docs/native/firebase-analytics/
I already use "firebase" for push notifications, but I need register pageviews manually, I need use these two plugins?
Ionic 'Native' Firebase and Ionic 'Native' Firebase Analytics are the Ionic wrappers that are "providing a common interface for all plugins and ensuring that native events trigger change detection in Angular". These wrappers can't work without the plugin.
On the other side we have the Cordova Plugins as you can see in the Ionic documentation for installing a plugin.
$ ionic cordova plugin add cordova-plugin-firebase (1)
$ npm install --save #ionic-native/firebase (2)
(1) - The Firebase Cordova Plugin that includes push notifications, event tracking, crash reporting, analytics and more.
(2) - The wrapper that offers you a 'gentle' interface to work with
So you can get everything you need with the Firebase plugin with OR without the Ionic Firebase wrapper.
Related
While using functionality of authentication through firebase, emulator is showing error i.e.{ you attempted to use a firebase module that is not installed on your android project by calling firebase.app() }.Please help me to resolve this error.
I'm using Expo as command line input.
react-native version -0.63.6,
"#react-native-firebase/app": "^8.4.3",
"#react-native-firebase/auth": "^9.2.3"
If you are using expo client, you should not use react-native-firebase modules because they are not compatible with expo client.
However, you can use firebase javascript SDK instead. It is all explained there.
Update 02-12-2021
Guys expo's eas-build is now public. You can add custom native codes and use react-native-firebase. Here is the link to a youtube tutorial. The video is short and super easy to follow. Here is the link to the docs
Previous answer
Currently, Firebase does not work in react native if you are using the mobile configuration. However, if you use the web configuration it will work. Here is the youtube tutorial. Watch from 38:20 to set up.
I am following the instructions here to add Firebase to my Flutter project. I want to use Firebase Analytics so I added it in pubspec.yaml
The package page for Firebase Analytics does not mention anything about adding Analytics as a dependency in android/app/build.gradle
No such thing is mentioned in Firebase for Flutter page either which I linked earlier. Now when registering the app in Firebase Console, it asks to add implementation of Firebase Analytics in app level build.gradle
So do I need to add it or not as it looks like only Firebase Console wants me to add it but couldn't find any mention of it on any official Flutter page.
I had the same question as well. Is seems obvious, that you should add the dependency on com.google.firebase:firebase-analytics to your project.
But… You actually don't need it.
It's easy to test! Just set up the Firebase Analytics like it is described in the docs:
google-services.json
apply plugin: 'com.google.gms.google-services' (and related things)
Configure multidex
firebase_analytics: ^X.Y.Z in pubspec.yaml
Don't add any Firebase dependencies to you app/build.gradle!
Now, enable the DebugView in Firebase Analytics: adb shell setprop debug.firebase.analytics.app your.package.
Run the app and send some events. Open the DebugView in Firebase Analytics console and you'll see them all!
Probably, all the magic happens in the Google Services Gradle Plugin:
The google-services plugin has two main functions:
Add dependencies for basic libraries required for the services you have enabled. …
You can see the result of this step by running ./gradlew :app:dependencies.
So, the plugin seems to add them for you!
You could also check what dependencies will be autoconfigured, by running ./gradlew :projects from your android dir. Mine is:
Root project 'android'
+--- Project ':app'
+--- Project ':firebase_analytics'
\--- Project ':firebase_core'
Now, after I add firebase_auth to my pubspec.yml and run flutter pub get, this command indeed lists one extra project:
Root project 'android'
+--- Project ':app'
+--- Project ':firebase_analytics'
+--- Project ':firebase_auth'
\--- Project ':firebase_core'
Adding the Google Analytics for Firebase SDK in your app and enabling analytics settings in the Firebase console is optional. It depends on what Firebase product you will be using. If Firebase suggests you add the Analytics SDK, it means that the Firebase product has integration with Analytics. See this documentation for your reference.
I have been searching around on google and the Ionic docs site and am confused on something. I see there is two seperate plugins. Firebase and FirebaseAnalytics. It seems like Ionic 3 doesn't really support the FirebaseAnalytics plugin since it's not on Ionic 3 docs site and when I tried to install it I got all kinds of dependency errors and when I tried to fix them it casued even more issues. Can someone who knows about this explain to my what I would be missing if I just used the Ionic 3 Firebase plugin and not newer exact FireBaseAnalytics plugin?
Make sure you are looking at the v3 documentation here.
As mentioned in the docs, you need to install these two things to your project:
$ ionic cordova plugin add cordova-plugin-firebase-analytics
$ npm install --save #ionic-native/firebase-analytics#4
Notice how the ionic-native firebase analytics module is specifically version 4. This is what makes it compatible with v3. Go through the instructions in those v3 documents and you should be good.
I've implemented follow this link.
Use SQLite In ionic 2
And as I known that SQLite native plugin is not support browser platform for now in Ionic 2 last version (rc6).
So, when I run ionic serve on the browser it will appear the message like below in console log.
Native: tried accessing the SQLite plugin but it's not installed.
Install the SQLite plugin: 'ionic plugin add cordova-sqlite-storage'
So I cannot test storage query with the browser, is there any way to test SQLite plugin (or use other storage query plugin like WebSQL) with ionic serve on browser.
I have a problem...
I'm try to add this plugin: https://github.com/danwilson/google-analytics-plugin.
I'm develop an application with: AngularJS, Ionic and Mobile First Platform 7.1(MFP), in this version of MFP I must add the plugin manually.
iOS works fine.
My problem is Android:
Error: "The import com.google.android cannot be resolved".
I download Google Play Services with SDK but the problem continues...
Any idea to solve this problem?
Regards.
This other plugin https://github.com/appfeel/analytics-google uses gradle dependencies which should solve this problem.
Other option could be to remove google play dependency from the plugin you mentioned and manually modify gradle (actually I don't recommend this option as gradle gets generated automatically each time you remove/add the platform).
Other option is to modify the plugin itself (maybe a github fork). Here you can see what should it be modified: https://github.com/appfeel/analytics-google/pull/11/files