Using firebase different apps same project vs different projects - android

I'm an android developper and i've a few apps published on google play... I do myself every single aspect of my apps including maintence.
I've two similar apps that share some core API... they dont share database nor storage, just some java API of my own and some google cloud functions i made (public)
When i was preparing the firebase infrastructue to run the second one i decided for creating a second app in the same firebase project as the first one... this was a decision made basically because i hated the firebase "switch between projects" tools.
my question is:
what are the advantages and disadvntages of having multiple apps sharing same firebase project?
when should i create a new project for a new app and when should i reuse the project
I'm a single self suficient developper so any sort of "project permissions" wont make difference to me

The primary reason to have multiple apps in the same project is when you want to share database and user data between them. Multiple apps in the same project are definitely expected to share data and configuration across all Firebase products. A common use case is when you have an end-user app and an admin app, both working against the same data.
If you're not sharing data between the apps, then you will only run into future trouble if you have multiple apps in the same project. (For example, see this question which was asked at the same time as yours.)

Related

how to make authentication in multiple apps using google developer console?

I want to make an android project using firebase as backend for it, the project contains multiple apps for admin,vendor,user and I know it's possible to add multiple apps in the same firebase project but is it possible to use one project and different apps in google developer console to add sha-1 for every app in it or what the best approach to implement that?

Multiplayer app design using instant apps

I have an app where users can send other users multiple choice questions. I want to know if the following is reasonable and what steps should i follow:
User A has downloaded the installable app and created a question for B. App will produce a sharable link.
B will open the link, answer the question without downloading the app.
In a scenario like this, can i use android instant apps? If not whats the best way i can do this?
I have read and tried tutorials on instant apps but couldnt find a match
Yes you can!
Instant Apps can be accessed many different ways, but primarily known through either the Try Now from your Play Store's listing and from opening associated URLs (from browser, other apps, etc.).
You want to do the former, URLs, so you'll need to setup your Instant App to handle those URLs. Handling Android App Links will guide you on how to do that, with a specific section, Create App Links for Instant Apps for Instant Apps.
Enabling this can actually let both your installable and instant app handle those URLs that your app shares.
What you can expect to happen is:
User B taps on the link shared by A
Your instant app opens and loads the correct activity/contents based on the intent-filter that's setup to handle the link
User B can then answer the question inside your instant app
Handle the results from within your instant app
You can find some samples to help you get started and become familiar with it. Though, recently, Instant Apps has been moving towards App Bundle integration (also see this) (with Android Studio 3.2, more prominently with 3.3), so this android-dynamic-features sample and its project structure/setup might be a bit more relevant (if you'll notice the instant modules).
Note: the App Bundle part is actually optional, it's the move to Dynamic Delivery and its the newer plugin: com.android.dynamic-feature vs com.android.feature.

Limit on number of Firebase projects

I used to add many projects under a Firebase account but this time when I wanted to create a project under Firebase console then it says that You are three projects away. I already had two projects under the console. Is the limit now reduced to 5 apps per account?
I found this info on the firebase faq site
https://firebase.google.com/support/faq/
"How many Firebase apps can I have in a project?
A project is a container for apps across iOS, Android and web. While there is no restriction on number of apps within a project, adding an app can create one or more underlying OAuth 2.0 client IDs. There is a limit of around 30 client IDs that can be created within a single project.
You should ensure that all apps within a project are platform variants of the same application from an end user perspective. For example, if you develop a white label application, each independently labelled app should have its own Firebase project."
In this link, you can find out more about the limitations of Google Project (API Console Project, Google Cloud Project, and Firebase Project). And you will also be able to request quota upgrades when you reach the limit.
Here's an extract:
"If you attempt to exceed your project limit, the console will prompt you to fill out a request form. This happens when you try to create a project but you have already reached your quota. The form will require you to specify the number of additional projects you need, along with their corresponding email accounts, billing accounts, and intended uses."
The limit on the number of projects is not a fixed number. It varies based on your account's standing.
Keep in mind that both Google Cloud projects and Firebase projects count towards the same total number of projects, so be sure to also check console.cloud.google.com for projects.

Seperating dev and prod with android and firebase?

I recently deployed an app to the play store and i am using firebase as backend. However, now I want to add some features to the app and want to create different environments so that i can test the app in a similar environment before releasing to production.
I went through these links online but I have some doubts.
https://medium.com/#Miqubel/multiple-build-types-in-firebase-on-android-6f6715f6dd83
https://web.archive.org/web/20160310115701/https://www.firebase.com/blog/2015-10-29-managing-development-environments.html
The app currently in PROD has database, functions and storage configured. So my goal is to have a mirror image of this setup through which i would test my app without affecting anything in the PROD database setup.
So far what i have figured out is:
1: I need to have different build types in my build gradle.
2: Somehow make my different build for DEV and PROD point to different databases on firebase.
Confusion:
Should I create two different projects on firebase or have two apps in 1 project?
When we have two apps in one firebase project does it have separate database or a single shared database?
It's recommended to have different projects for each environment that you want to test separately. Don't use the same project for development and production, because your changes during development could cause problems in production.
Please read this blog for more information.

Best way to set up Google Analytics for same app, multiple platforms

What's the best way to set up Google Analytics to track one app on multiple platforms (e.g. Android, iOS).
The app is very similar on all the platforms, so we'd like to view activity in aggregate, but also have the ability to cut by key values such at platform, user state (signed in, signed out etc)
Also, what's the best way to track a unique instance of the app (as a user)? Is there some way to create a unique ID on install that stays in all tracking calls for the lifetime of the install?
Thanks!
What I did is make a list of what I want to track and name them the same thing in both apps. The code in the app will be different from android to iOS.
But for the analytics part just use one project in the google dev console. Then add both app to the project like the docs say. you will have to follow the steps in the google documentation. But just keep it in the same project and then both devices types will be in the same project and you won't have to juggle two projects at the same time.
It works great doing it like that

Categories

Resources