Multiple Android App in single Google Firestore Project - android

I presently work on Firestore project in Android. The project works perfectly. Now I want to create another android app for the same Firestore project. This is a helping tool for the main app.
But here I try to add another app to Firestore it displays error the same SHA key is used.
Now how to rectify this problem?

If you want to add another app to a Firebase project, you need to do at least one of two things:
Give the app a new application ID
Sign the app with a different signing key (different SHA-1)
If you want to use the same signing key for the second app, then you will have to give the app a different application ID than the first.

Related

Firebase invalid credentials on Android

That's my concern, currently I'm developing an application that uses Firebase. Recently my identifiers for Android no longer work, the error tells me that the App ID does not match, however I am using google-services.json provides from my firebase console after adding my android application with its SHA key- 1.
My file is inside android/app folder like Firebase want it.
I have no problem with my iOS application, everything works fine.
Do you think I should try to delete Android ID clients OAuth 2.0 from google cloud platform and try to recreate it ?
it works, delete and recreate everything works, because Firebase works independently : if you delete an app inside your firebase console, it doesn't delete it inside google cloud platform.

Change Firebase project for production app with Google Authentication?

I need to change Firebase Project of production app with google authentication.
My app is working with a firebase project and a backend server from which I can force users to update my app to the latest version after login with version the user has. Because of that, I hope I can change the Firebase project where I do the authentication with Google.
I can't use old pair Package Name / SHA-1 in new Firebase project, but I can use old package name with NEW SHA-1, right?
So, users with old versions will login with old firebase project and after upgrade my app they will login with with new firebase project, right?
If so, users won't need to uninstall my app, right?
Now, how can I change the SHA-1 in Android Studio?
What I understand you are trying to do is the following.
You want to associate your app to new firebase project
You want to keep you old user base intact.
You have asked if you can change the SHA-1 of the app the answer is no without changing the signature of the app that could change everything and is not an option.
What you could do instead is use two different firebase projects in a single app and write your own logic to manage the users. You can follow this link https://firebase.googleblog.com/2016/12/working-with-multiple-firebase-projects-in-an-android-app.html here the author has explained how to go about it. you can also look up for similar solutions or arounds for the problem. Hope this helps in some way and please try to make you questions precise.
Correct me if I understood your need wrongly!
You have users and want to sign them in to a new firebase project with interrupting your current users?!
I believe what you need to use is the custom Firebase authentication
whenever the user logs in, you produce a token in you current project and pass it on to the new project.
As for:
backend server from which I can force users to update my app
you can also achieve this in firebase, hopefully the backend server is not just for this!

SHA 1 Hash key is same for all application?

I have integrated Google login in my Android application before one month. Now I am planning to launch another application with different package name. I am trying to implement Google login in this application too.
When I have generated and pasted SHA 1 to google and its giving error like below
Duplicate fingerprint
The fingerprint you specified is already used by an Android OAuth2 client ID in this project or another project
I want know that SHA 1 is same for all project in same machine even We change package name in application ?
What is solution for use Google login in another application ? I am confused because Google ask package name with Google Auth. I have marked that in new package also Google signin working fine but it will cause issue in future ?
Every app has a different SHA key fingerprint. You need to update it for every project that you make.
For Example: If I am updating my app and I create a new project, ill have to add another SHA key to the firebase project under the settings of the app in firebase.

android client id create linked app

I have been struggling with setting up my app in the Android Developer Console. Specifically, I need to set up and assign a client ID to the App (or linked app, not sure), however, I am unable to do so.
Any attempt to create the client ID I am told one already exists. Yet, I can not publish my app since the app is not linked to one with a client ID.. or so I gather.
//I am unable to press the create button. I am blocked out from doing so.
///the step required to publish.
You need to provide the correct package name that your app uses as well as generate the fingerprint using key gen and paste that key there. Without those, you cannot create a client id for your app. The required steps are explained in great detail in their help pages.

Uploading same App in two developer console Accounts

Suppose I have two developer console accounts.
If I want to upload same apk in both accounts, then whether both apps works fine and ad will serve properly or is there any problem ?
You can't upload same .apk from two account or the same account.Google check out the packageName and version for this .So if you want to upload same .apk from two account the you have to change the package name
Should work fine as long as the package name of both the apps are different.
Play store requires each app to have a unique package-name to identify each app individually. ( Just like we are assigned unique roll numbers in exam :) )
Here is what you can do
1) You create a new project with same source code and change package-name. ( Easy way)
2) Create a new project. Add existing project as library to it. Create a dummy activity in new project which just calls you main activity. This way you will not have duplicate code.
But I will not advise that because then your app will be competing with itself. Your downloads will be divided between two independent app which will result in lower chance of your app to be discoverable.

Categories

Resources