firebase-android-sdk icon indicating copy to clipboard operation
firebase-android-sdk copied to clipboard

Allow packageName and applicationId to be different

Open aruke opened this issue 3 years ago • 2 comments

What feature would you like to see?

Not sure if this is the correct repository to report this, but it's Android-related, so I'll go ahead.

There wasn't much difference between Android's packageName and applicationId a long time ago. Now packageName, aka namespace, can be configured independently of the applicationId.

Screen Shot 2022-05-16 at 9 19 12 PM

Configure the app module | Android Developers

But, Firebase still treats packageName and applicationId as the same.

Screen Shot 2022-05-16 at 9 19 04 PM

Add Firebase to your Android project | Firebase Documentation

How would you use it?

I love to have the ability to change the package name/namespace without any troubles with Firebase SDK.

aruke avatar May 16 '22 12:05 aruke

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar May 16 '22 12:05 google-oss-bot

Thanks for filing this, @aruke. I'll see if I can notify our documentations team about this.

argzdev avatar May 16 '22 15:05 argzdev

Thanks for filing this, @aruke. I'll see if I can notify our documentations team about this.

@aruke

Hi guys, are there any updates? I am currently struggling with this issue.

I have 3 firebase projects and a single code base. I am trying to build 3 different Android build files, and each build should match one firebase project. Ideally, I want to change the applicationId to identify different Android apps and leave the package_name unchanged. Then I can use applicationId to create 3 different firebase configuration files google_services.json, and then 3 Android apps would work with the matching firebase project.

Now after experimenting with this approach, the app won't open properly.. only a white screen, not sure what's wrong.

xmany avatar Sep 29 '22 04:09 xmany

Thanks for reporting, @xmany. This is still along the roadmap. Please do leave a thumbs up emoji on the original post, so that we can prioritize this base on demand. FWIW, I think this is also somewhat similar to what you want to achieve.

That said, let me consult with some engineers to get some insights regarding this.

argzdev avatar Sep 29 '22 09:09 argzdev

I had an existing Firebase project and a corresponding Flutter project. Since this is an old app, somehow the older credentials for Firebase project could not be found. We tried creating a new Firebase project for this, where we have different packageName and applicationId, and the notifications just don't seem to work anymore. Hoping to see a fix on this as soon as possible

praveengitsit avatar Sep 25 '23 12:09 praveengitsit