Unity. Do I really need to add Firebase analytics *and* crashlytic sdks? - firebase

I want to add only firebase crashlytics to my game.
The firebase guide tells you to add the add the package FirebaseAnalytics.unitypackage
and then packages for any other firebase features you want.
So if I follow the guide I should add FirebaseAnalytics.unitypackage and FirebaseCrashlytics.unitypackage
However, all the packages are about the same size; 90MB, and looking into them, they contain a lot of the same stuff. Eg they all contain the google play services resolver. It looks like each one can function on its own.. and when I import just crashlytics I dont get errors and can build a build that runs.

Crashlytics should be able to run in apps that don't also include Analytics. If you're having trouble making that work, edit your question to show how you included the package, and details about the problem you get.
If Analytic is present in the app, Crashlytics may use that to report certain events. So you'll be missing features such as crash-free statistics, the Latest Release report, and Breadcrumbs.
For more info, see:
the Firebase documentation on adding crashlytics to your app
the Firebase blog post on the Crashlytics relaunch, specifically this section:
Combining analytics data and crashes helps you unlock additional insights into your app’s stability. The Firebase Crashlytics SDK works seamlessly with the Google Analytics SDK to provide features such as crash-free statistics, the Latest Release report, and Breadcrumbs. With Breadcrumbs you can see the steps a user took that led to a crash. This insight helps you reproduce and fix issues quickly. Google Analytics replaces Fabric's legacy analytics engine, Answers, so we encourage you to add Google Analytics to your apps.

Related

Unity & Firebase - Google and Facebook Login/SignIn/Authentication Tutorials

For the last couple of days, I have faced an issue with my Unity project regarding adding Google and Facebook authentication for my users, using Firebase. The thing is that there exist a couple of youtube tutorials for each of those two implementations but they are quite misleading and rushed.
Apart from that those tutorials refer to the creation of a new project which implies that the Firebase Auth package is not yet installed. And I mention this because I've seen plenty of people in the comments that are struggling with the Plugins and Parse folders that get overwritten whenever both Firebase Auth and Google or Facebook packages are installed. So there does not exist a rule of thumb on how to proceed in cases where projects already had other methods of authentication such as Email/Password.
Of course, the documentation for both Google and Facebook is unclear on how to get the access token.
Facebook SignIn doc: https://firebase.google.com/docs/auth/unity/facebook-login?hl=en&authuser=0
Google SignIn doc:
https://firebase.google.com/docs/auth/unity/google-signin?hl=en&authuser=0
I've made this post in order to find a step-by-step solution to my problem and hopefully help the community find a solution to a problem that concerns many developers.
[Edit]: My question is. How exactly do I implement the Google & Facebook Sign-In, based on the documentation, that is unclear, especially on the step
Follow instructions for Android and iOS+ to get an access token for the signed-in Facebook user.
And I am speaking for a project that already has imported Firebase.Authentication, which means that folders such as Plugins and Parse are already in the Assets and get overloaded from the packages requested by the 'tutorials' (Because the docs do not even mention what package to use and how).
[Edit]: As of right now I've managed to set up the code in a way that has no errors. When I run it though I get:
[Android]: Exception: Field currentActivity or type signature not found.
[iOS]: EntryPointNotFoundException: GoogleSignIn_Create
After some googling, they proposed testing it after I build it which I think is way too much time-consuming.
This is the answer I've got from Firebase support.
First of all, we need to note that Firebase only has three native authentication providers: email, phone, and anonymous authentication. For the other methods, Firebase needs to trust how their respective third-party providers handle their authentication flow. That's why Firebase can't offer a way to get the access token. This is not its responsibility.
So, to sign in with a Federated provider (FP) you must follow the following steps.
Think about which will be your target mobile platform. Not all the FP provide the same authentication flow on iOS or Android. For example Google offers a more handy way to authenticate Android devices by using Google Play Game Services
Authenticate in Unity Using Google Play Games Services | Firebase
Search on his FP's official GitHub repository for the official plugins to get access to the FP's SDK on Unity. For example, Google offer a useful plugin to authenticate user in both platforms
GitHub - googlesamples/google-signin-unity: Google Sign-In API plugin for Unity game engine. Works with Android and iOS.
Last plugin's release: https://github.com/googlesamples/google-signin-unity/releases/tag/v1.0.4
Examples - Unity SDK - Documentation - Meta for Developers
Create the FP credentials according to its own requirements. For example, Google login requires the use of web_client_id, which can be obtained from the google-services.json or GoogleService-Info.plist files needed to build the application on the target platform.
https://github.com/googlesamples/google-signin-unity#get-a-google-sign-in-configuration-file
https://github.com/googlesamples/google-signin-unity#using-this-plugin-with-firebase-auth
Once you've built the FP's credential into your project, it's time to check out our Firebase documentation for using the FP credential in our authentication flow. I recommend having the Firebase reference along with the documentation as it will help to know what arguments the required method needs.
The best way to test your new authentication provider is by implementing the Firebase Authentication Unity Quickstart. Please clone the Unity Quickstart repository here and deploy the Unity project found in the auth folder. Follow the steps mentioned in the README.md file and build the app on your target platform.
I recommend that you add the FP's SDK right in the same step as adding the Firebase SDK plugins to avoid some build issues. Since these errors are more related to Unity than Firebase, I recommend reaching out to our communities on StackOverflow, Google Groups, and Slack for help with these issues as they have more knowledge than I on those topics.
So, in conclusion, getting credentials from third-party providers is a task delegated to them and not to Firebase since this one is not responsible for any third-party authentication flow.

Firebase overview dashboard for different projects

In firebase we have 5 projects and 2 to 6 apps per project. Each project has their own overview / dashboard (eg. with Analytics & Crashlytics graphs).
However, we'd like to have a single dashboard as overview for all projects (if possible, with a filter for apps for each project). Is it possible to configure this in the Firebase console somehow? If not: is it possible to extract the necessary data ourselves to create our own dashboard (and where can we extract that data)?
You can link your firebase analytics to Google Analytics. It can be done from analytics dashboard in your firebase project. It's basically an agreement that let your firebase data accessible from Google Analytics panel! (I'm not a lawyer, if you want to make sure what's going on please check it with your lawyer!)
Then in Google Analytics, you can make custom reports.
I'm not sure if custom reports are useful for your specific need, so please check beforehand.

Building a real world Flutter app with Firebase and Stripe

I'm trying to create a full on mobile app using Flutter and have selected to use Firebase as the backend support.
So I've seen that Firebase docs and tutorials for Flutter are available for basic needs such as Authentication, CRUD and things alike. However, my app, like most others has nuanced features that the docs and tutorials do not cover, I was wondering if anyone has any resources (GitHub repos, videos, etc) that could be used to build features like the following:
User persistence
Friend's list
Group creation by selecting friend's from list
Making transaction posts (I'll use Stripe's API for transactions) in these private groups
I was unable to find resources that matched these features and before I started getting my hands dirty with building them from scratch myself I wanted to see if anyone here knew of any that I may not.
I've tried almost all youtube tutorials and code labs and things alike.
Thanks!
-
I'm trying to do the same thing.
At first I recommend this course on Udemy: https://www.udemy.com/course/learn-flutter-dart-to-build-ios-android-apps/ for the basics.
It will explain Flutter and Dart and their interaction with the Phone in detail and give you also some basics in Firebase Authentication. It's only like 10 bucks I'm 70% in and it's pure gold.
From there you can google or youtube the content that you need. StackOverflow, Youtube and Medium.com are your best info sources.

Does Firebase Real-Time DB now explicitly require Google Play Services? [duplicate]

This question already has answers here:
Which firebase services require google play services on Android?
(4 answers)
Closed 4 years ago.
Background
I have an older app that still runs properly and is based on an old version of Firebase using the Real-time database functionality.
It runs on my emulator that does not have Google Services available.
Attempting To Upgrade To New Firebase
Now, I'm attempting to upgrade that code and I'm running on an emulator image that does not have Google Play services available.
Installed Firebase Via Android Studio Tools...Firebase...
I did the installation via the built-in tools from Android Studio (following the latest docs from Firebase).
The Problem
Every time the new code based on the latest version of Firebase attempts to call the following line of code I get an error (follows):
FirebaseDatabase fbd = FirebaseDatabase.getInstance();
Error Message
I get the following error:
Default FirebaseApp is not initialized in this process . Make
sure to call FirebaseApp.initializeApp(Context) first.
I'm Already Making That Call
However, I am successfully making the call to FirebaseApp.initializeApp(Context) previous to that line of code -- I've stepped thru via debugger.
Unsure About Google Services
I've seen that some say you have to add a reference to the Google Services but I'm not sure why the Firebase docs don't mention that and the built-in Android Studio tool didn't add it.
Can you point me to a definitive place in the docs where it says you need Google Services? Has anyone experienced this? Does anyone know for sure if Google Services are required?
Ok, I looked more closely at the Firebase docs (https://firebase.google.com/docs/reference/android/com/google/firebase/database/FirebaseDatabase.html#getInstance(java.lang.String))
Here's a snapshot of the info:
I'm adding that because of that odd Also: Google Play Services item. It's a link that does nothing. It isn't very helpful, but
I'm assuming it means that you do indeed need Google Play Services to be available.
This situation is odd for another reason also, and that is because the call to FirebaseApp.initializeApp(this); succeeds without error even though you can basically do nothing after that, since you will have a dependency upon Google Services for the core functionality.

What are the main differences between Firebase vs Firebase 2.0?

Google just released Firebase 2.0.
It seems they are completely separate platforms.
Firebase: https://www.firebase.com/
Firebase 2.0: https://firebase.google.com/
APIs are also different.
Firebase: https://www.firebase.com/docs/web/api/
Firebase 2.0: https://firebase.google.com/docs/reference/js/#firebase
Could someone explain the differences in the core concepts on both mobile and web?
I've been building an app using old Firebase.
Should I change my codes to use Firebase 2.0?
The new version of Firebase is the same platform - it just adds a whole range of new features, so the big change to the core concepts is an expansion of what you can do.
The Realtime Database offers the same functionality as before, but with a refreshed API and a new console. You can keep using the same approach and data model as before, and the API changes are largely cosmetic (renaming to be consistent with the newer features).
Authentication is pretty similar, but it has been expanded to include new features like account linking and customizable emails. You should be able to upgrade your application to the new SDKs and console pretty easily: take a look at our migration guides for Android, iOS and the web.
You can import your project at any time. Your applications and the existing SDKs will continue to work. You can then update your code when you are ready to use some of the new Firebase features in your application.
The new concepts are really around the new features:
Analytics is a new mobile-first analytics product that gives free and unlimited event reporting, and allows building audiences which can be used in many other services.
Storage allows you to store and serve user-generated content, such as photos or videos.
Remote Config allows you to change the behavior and appearance of your app without publishing an app update.
Cloud Messaging is a cross-platform messaging solution that lets you reliably deliver messages and notifications at no cost. Notifications gives you a tool in the Firebase Console to send re-engagement messages easily.
Crash Reporting lets you collect crash data from your Android and iOS apps, to find and fix problems more quickly.
Dynamic Links are smart URLs that dynamically change behavior to provide the best experience across different platforms. They allow you to use deep links that survive app installs on Android and iOS.
Several existing Google products have been integrated into Firebase as well
Invites replaced AppInvites, giving easy way to sending personalized email and SMS invitations. App Indexing gets your app into Google search.
Firebase now also integrates with AdWords to let you target ad campaigns with Analytics audiences, and AdMob to automatically track in-app ad effectiveness.
Its a lot of new features, but you don't have to try them all at once! Once you upgrade, its straightforward to pick and choose.

Resources