Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to have two Firebase (Firestore) database for debug and produciton in andorid?

I'm developing an android app. I want to keep two separate databases for my app. One is for Production and another is for debugging and testing. how should I achieve this? assume that I'm using Firebase OTP auth, Cloud Firestore and Google Cloud Messaging services in my app. When I try to create two projects, I got an error that, "The custom token corresponds to a different audience. [ App ID does not match requested project. ]" Thanks in advance!


1 Answers

You're supposed to create different Firebase projects, one for each environment you want to test. The data for each one is completely independent of each other, and you have to configure your app to point to the project you want to use at any given moment.

Please read the documentation for more information.

like image 138
Doug Stevenson Avatar answered Oct 28 '25 17:10

Doug Stevenson